16.7k views
0 votes
Which option of rmdir command will remove all directories a, b, c if path is a/b/c?

1) -b
2) -o
3) -p
4) Cannot be determined

1 Answer

3 votes

Final answer:

The rmdir command with the -p option will remove the directories a, b, and c in the path a/b/c, provided that each subdirectory is empty after the removal of its subdirectory.

Step-by-step explanation:

The correct option to use with the rmdir command to remove all directories a, b, c when the path is a/b/c is -p. This option stands for 'parents' and will attempt to remove the directory c, then b, and finally a but only if they become empty after the removal of their subdirectories. The rmdir command is very strict and will only remove empty directories, so this command presupposes that directories b and c are empty after c and then b are removed.

User Ivagarz
by
8.1k points