1.

Which of the following command will remove the file named * ?(a) rm *(b) rm ‘*’(c) rm \*(d) rm ‘*’ and rm \*I got this question at a job interview.This interesting question is from Pattern Matching, Escaping and Quoting in division The Shell of Unix

Answer»

Right CHOICE is (d) rm ‘*’ and rm \*

The explanation: To suppress the nature of wildcard * we can use either escaping or quoting. The \ symbol will suppress the feature of wildcard and will remove the file NAMED *. SIMILARLY using quoting we can TURN off the meaning of the META character.



Discussion

No Comment Found

Related InterviewSolutions