 |
|
Oracle Tips by Burleson |
Deleting directories
The rmdir (remove directory) command is used to delete an
empty directory. The directory to be deleted can be referenced
via a fully qualified path or via a relative path starting with the
current working directory. Here are some examples of each
method.
$ rmdir /home/tclark/new_dir1
$ ls
examples new_dir2 new_dir3
$ rmdir new_dir2
$ ls
examples new_dir3
Note that you cannot remove a non-empty directory with the
rmdir command as demonstrated below; instead use the rm
command with the –r option:
$ ls
examples new_dir3
$ rmdir new_dir3
rmdir: `new_dir3': Directory not empty
$ rm -r new_dir3
$ ls
examples
$
The above book excerpt is from:
Easy Linux
Commands
Working Examples of Linux Command Syntax
ISBN:
0-9759135-0-6
Terry Clark
http://www.rampant-books.com/book_2005_1_linux_commands.htm |