rmdir [-p] [-s] dirname. . .
removes the entries for the named directories,
which must not be empty.
rmdir has the following options:
This option allows users to remove the directory
and its parent directories which become empty.
A message is printed on
about whether the whole
path is removed or part of the path remains for some
This option is used to suppress the message printed on
standard error when -p is in effect.
If the environment variable POSIX2 is set, this option is on by
default (i.e., standard error messages are always suppressed).
language-specific message file (See LANG on
All messages are generally self-explanatory.
It is forbidden to remove the directories . and ..
in order to avoid the
consequences of inadvertently doing something like the following:
rm -r .*
returns an exit code of 0 if all the specified directories
are removed successfully.
Otherwise, they return a non-zero exit code.
permits the user to mark explicitly the end of any command
line options, allowing
to recognize filename arguments that begin with a -.
As an aid to BSD migration, rmdir will accept - as
a synonym for --.
This migration aid may disappear in a future release.
If a --
and a -
both appear on the same command line, the second will be interpreted as
This command has been updated to handle files greater than 2GB.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004