rmdir

Remove a directory.

Format

   rmdir directory-list

Summary

The rmdir utility deletes empty directories from the file system.

Arguments

The directory-list contains one or more pathnames of empty directories that rmdir removes.

Notes

Refer to the rm utility with the -r option if you need to remove directories that are not empty, together with their contents.

Examples

The following command deletes the empty literature directory from the working directory.

z123456@turing:~$ rmdir literature

The next command line removes the letters directory using an absolute pathname.

z123456@turing:~$ rmdir /home/turing/z123456/letters