Introduction to UNIX for Web Developers Deleting Directories Removing directories is also simple using the "rmdir" utility.

rmdir options directory_list

Options Description
-p Deletes the parent directory if the command causes the parent to have no contents
-s Censors messages while using the -p option

Here is an example

[rmdir Example]

By the way, you can also delete directories using the rm - r option. However, as we mentioned, that is a pretty powerful command which should be used with great care. It is better to use rmdir when you can.

Previous | Next | Table of Contents