4.3BSD-Reno/src/bin/rmdir/rmdir.1

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)rmdir.1	6.3 (Berkeley) 7/24/90
.\"
.Dd July 24, 1990
.Dt RMDIR 1
.Os BSD 4.4
.Sh NAME
.Nm rmdir
.Nd remove directories
.Sh SYNOPSIS
.Nm rmdir
.Op Fl p
.Ar directory ...
.Sh DESCRIPTION
The rmdir utility removes the directory entry specified by
each
.Ar directory
argument, provided it is empty.
.Pp
Arguments are processed in the order given.
In order to remove both a parent directory and a subdirectory
of that parent, the subdirectory
must be specified first so the parent directory
is empty when
.Nm rmdir
tries to remove it.
.\" .Pp
.\" The following option is available:
.\" .Tw Ds
.\" .Tp Fl p
.\" Each
.\" .Ar directory
.\" argument is treated as a pathname of which all
.\" components will be removed, if they are empty,
.\" starting with the last most component.
.\" (See
.\" .Xr rm 1
.\" for fully non-discriminant recursive removal).
.Pp
The
.Nm rmdir
utility exits with one of the following values:
.Tw Ds
.Tp Li \&0
Each directory entry specified by a dir operand
referred to an empty directory and was removed
successfully.
.Tp Li \&>\&0
An error occurred.
.Tp
.Sh SEE ALSO
.Xr rm 1
.Sh STANDARDS
The
.Nm rmdir
function is expected to be POSIX 1003.2 compatible.