NAME
rmdir — remove
directories
SYNOPSIS
rmdir |
[-p] dir... |
DESCRIPTION
The rmdir utility will remove the
directory entry specified by each dir operand, which must refer to an empty
directory.
Directories will be processed in the order specified. If a
directory and a subdirectory of that directory are specified in a single
invocation of the rmdir utility, the subdirectory
must be specified before the parent directory so that the parent directory
will be empty when the rmdir utility tries to remove
it.
OPTIONS
The rmdir utility supports the XBD
specification,
Utility
Syntax Guidelines .
The following option is supported:
OPERANDS
The following operand is supported:
- dir
- A pathname of an empty directory to be removed.
STDIN
Not used.
INPUT FILES
None.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of
rmdir :
LANG- Provide a default value for the internationalisation variables that are
unset or null. If
LANGis unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined. LC_ALL- If set to a non-empty string value, override the values of all the other internationalisation variables.
LC_CTYPE- Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments).
LC_MESSAGES- Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
NLSPATH- Determine the location of message catalogues for the processing of LC_MESSAGES .
ASYNCHRONOUS EVENTS
Default.
STDOUT
Not used.
STDERR
Used only for diagnostic messages.
OUTPUT FILES
None.
EXTENDED DESCRIPTION
None.
EXIT STATUS
The following exit values are returned:
CONSEQUENCES OF ERRORS
Default.
APPLICATION USAGE
The definition of an empty directory is one that contains, at most, directory entries for dot and dot-dot.
EXAMPLES
If a directory a in the current directory is empty except it contains a directory b and a/b is empty except it contains a directory c :
rmdir -p a/b/c
FUTURE DIRECTIONS
None.
SEE ALSO
rm(1) , the XSH specification description of remove(3) , rmdir(3) , unlink(3) .