Home / Programming MCQs / Linux MCQs / Question

V

Virat Bhati • 7.23K Points
Tutor III

Q. Which option of the “rmdir” command deletes all directories rep1, rep2, rep3 if the path is rep1/rep2/rep3?

(A) –b
(B) –o
(C) –p
(D) –t
The “rmdir -p” command in Unix allows you to delete parent directories if they are also empty. For example:

$ rmdir -p rep1/rep2/rep3

this command will first delete rep3/, then rep2/ and finally rep1/ thus deleting the whole directory tree specified in the command’s argument.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.