Multiple choice unix

How do you delete a directory?

  1. rm directory

  2. mv directory

  3. cd directory

  4. rmdir directory

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The rmdir command is the standard Unix/Linux command to remove an empty directory. rm is used for files (unless used with -r), mv is for moving/renaming, and cd is for changing directories.