]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - bin/rmdir/rmdir.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / bin / rmdir / rmdir.1
1 .\"-
2 .\" Copyright (c) 1990, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" This code is derived from software contributed to Berkeley by
6 .\" the Institute of Electrical and Electronics Engineers, Inc.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)rmdir.1     8.1 (Berkeley) 5/31/93
33 .\" $FreeBSD$
34 .\"
35 .Dd March 21, 2004
36 .Dt RMDIR 1
37 .Os
38 .Sh NAME
39 .Nm rmdir
40 .Nd remove directories
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl pv
44 .Ar directory ...
45 .Sh DESCRIPTION
46 The
47 .Nm
48 utility removes the directory entry specified by
49 each
50 .Ar directory
51 argument, provided it is empty.
52 .Pp
53 Arguments are processed in the order given.
54 In order to remove both a parent directory and a subdirectory
55 of that parent, the subdirectory
56 must be specified first so the parent directory
57 is empty when
58 .Nm
59 tries to remove it.
60 .Pp
61 The following option is available:
62 .Bl -tag -width indent
63 .It Fl p
64 Each
65 .Ar directory
66 argument is treated as a pathname of which all
67 components will be removed, if they are empty,
68 starting with the last most component.
69 (See
70 .Xr rm 1
71 for fully non-discriminant recursive removal.)
72 .It Fl v
73 Be verbose, listing each directory as it is removed.
74 .El
75 .Sh EXIT STATUS
76 The
77 .Nm
78 utility exits with one of the following values:
79 .Bl -tag -width indent
80 .It Li 0
81 Each directory entry specified by a
82 .Ar directory
83 operand
84 referred to an empty directory and was removed
85 successfully.
86 .It Li >0
87 An error occurred.
88 .El
89 .Sh SEE ALSO
90 .Xr rm 1
91 .Sh STANDARDS
92 The
93 .Nm
94 utility is expected to be
95 .St -p1003.2
96 compatible.
97 .Sh HISTORY
98 A
99 .Nm
100 command appeared in
101 .At v1 .