Q. Which option of the “rmdir” command deletes all directories rep1, rep2, rep3 if the path is rep1/rep2/rep3?
β
Correct Answer: (C)
–p
Explanation: 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.