The rmdir command

The rmdir command



What does it do ?

This removes (deletes) specified directories.


How is it used ?

rmdir directory_name


Examples and remarks

The directory being removed must be empty. For example if you rmdir junkdir and this directory contains files, then you will be sent an error message and this directory will not be removed.
Options include: rmdir [-p] [-s] directory_name. The -p option allows you to remove the directory and its parent directories that become empty. The -p option used alone will generate a message to the user, but with the -s option this message is suppressed.



next previous table of contents