.\" Copyright Andries Brouwer, Ragnar Hojland Espinosa and A. Wik, 1998. .\" .\" This file may be copied under the conditions described .\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998 .\" that should have been distributed together with this file. .\" .TH RMDIR 1 1998-11 "GNU fileutils 4.0" .SH NAME rmdir \- remove empty directories .SH SYNOPSIS .BI "rmdir [" options "] " directory... .sp POSIX options: .B "[\-p] [\-\-]" .sp GNU options (shortest form): .B [\-p] .B [\-\-ignore\-fail\-on\-non\-empty] .B "[\-\-help] [\-\-version] [\-\-]" .SH DESCRIPTION .B rmdir removes empty directories. .PP If any .I directory argument does not refer to an existing empty directory, it is an error. .SH "POSIX OPTIONS" .TP .B "\-p" If .I directory includes more than one pathname component, remove it, then strip the last component and remove the resulting directory, etc., until all components have been removed. Thus, `rmdir \-p a/b/c' is equivalent to `rmdir a/b/c; rmdir a/b; rmdir a'. .TP .B "\-\-" Terminate option list. .SH "GNU OPTIONS" .TP .B "\-\-ignore\-fail\-on\-non\-empty" Normally .B rmdir will refuse to remove a directory that is not empty. This option causes .B rmdir to ignore the failure to remove a directory, if that failure is due to the directory being non-empty. (New in file\%utils-4.0.) .TP .B "\-p, \-\-parents" As above. .SH "GNU STANDARD OPTIONS" .TP .B "\-\-help" Print a usage message on standard output and exit successfully. .TP .B "\-\-version" Print version information on standard output, then exit successfully. .TP .B "\-\-" Terminate option list. .SH ENVIRONMENT The variables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have the usual meaning. .SH "CONFORMING TO" POSIX 1003.2 .SH "EXAMPLE OF USE" The command `\fIrmdir foo\fP' will remove the directory \fIfoo\fP if it is empty. To remove a nonempty directory, together with everything below, use `\fIrm \-r foo\fP'. .SH NOTES This page describes .B rmdir as found in the fileutils-4.0 package; other versions may differ slightly.