rmdir(1) CLIX rmdir(1)
NAME
rmdir - Removes a directory
SYNOPSIS
rmdir [-p] directory ...
FLAGS
-p Removes directories.
DESCRIPTION
The rmdir command removes a directory from the system. The directory must
be empty before you can remove it, and you must have write permission in
its parent directory. Use the ls -al command to see if a directory is
empty.
EXAMPLES
To empty and remove a directory, enter:
$ rm mydir/* mydir/.*
$ rmdir mydir
This removes the contents of mydir, then removes the empty directory. The
rm command displays an error message about trying to remove the
directories . (dot) and .. (dot dot), and then rmdir removes them.
Note that rm mydir/* mydir/.* first removes files with names that do not
begin with a . (dot), then those with names that do begin with a . (dot).
If the directory contains filenames that begin with a . (dot), the ls
command does not list them unless you use the -a flag.
RELATED INFORMATION
Commands: ls(1), rm(1)
Functions: rmdir(2), unlink(2)
2/94 - Intergraph Corporation 1