πŸ“Š Linux
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
πŸ’¬ Discuss
βœ… 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.

Explanation by: Virat Bhati
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.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
219
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Virat Bhati
Publisher
πŸ“ˆ
94%
Success Rate