Annotation of src/usr.bin/du/du.1, Revision 1.33
1.33 ! schwarze 1: .\" $OpenBSD: du.1,v 1.32 2014/10/17 14:46:54 schwarze Exp $
1.4 millert 2: .\" $NetBSD: du.1,v 1.6 1996/10/18 07:20:31 thorpej Exp $
1.1 deraadt 3: .\"
4: .\" Copyright (c) 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
1.18 millert 15: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 16: .\" may be used to endorse or promote products derived from this software
17: .\" without specific prior written permission.
18: .\"
19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29: .\" SUCH DAMAGE.
30: .\"
31: .\" @(#)du.1 8.2 (Berkeley) 4/1/94
32: .\"
1.33 ! schwarze 33: .Dd $Mdocdate: October 17 2014 $
1.1 deraadt 34: .Dt DU 1
35: .Os
36: .Sh NAME
37: .Nm du
38: .Nd display disk usage statistics
39: .Sh SYNOPSIS
40: .Nm du
1.33 ! schwarze 41: .Op Fl achkrsx
1.32 schwarze 42: .Op Fl d Ar depth
1.19 jmc 43: .Op Fl H | L | P
1.26 sobrado 44: .Op Ar
1.1 deraadt 45: .Sh DESCRIPTION
46: The
1.10 aaron 47: .Nm
1.8 aaron 48: utility displays the file system block usage for each
49: .Ar file
50: argument
1.1 deraadt 51: and for each directory in the file hierarchy rooted in each directory
1.12 aaron 52: argument.
53: Note that the system block usage is usually greater than
1.7 millert 54: the actual size of the file.
1.1 deraadt 55: If no file is specified, the block usage of the hierarchy rooted in
56: the current directory is displayed.
57: .Pp
58: The options are as follows:
59: .Bl -tag -width Ds
1.19 jmc 60: .It Fl a
1.32 schwarze 61: Display entries for files in addition to entries for directories.
1.19 jmc 62: .It Fl c
63: Display the grand total after all the arguments have been processed.
1.32 schwarze 64: .It Fl d Ar depth
65: Do not display entries for files and directories more than
66: .Ar depth
67: levels deep;
68: .Fl d Cm 0
69: has the same effect as
70: .Fl s .
71: Overrides earlier
72: .Fl d
73: and
74: .Fl s
75: options.
1.1 deraadt 76: .It Fl H
77: Symbolic links on the command line are followed.
1.29 jmc 78: Symbolic links encountered in the tree traversal are not followed.
1.19 jmc 79: .It Fl h
1.25 jmc 80: "Human-readable" output.
81: Use unit suffixes: Byte, Kilobyte, Megabyte,
82: Gigabyte, Terabyte, Petabyte, Exabyte in order to reduce the number of
83: digits to four or less.
1.1 deraadt 84: .It Fl k
1.25 jmc 85: By default, all sizes are reported in 512-byte block counts.
86: The
1.1 deraadt 87: .Fl k
1.25 jmc 88: option causes the numbers to be reported in kilobyte counts.
1.19 jmc 89: .It Fl L
90: All symbolic links are followed.
91: .It Fl P
92: No symbolic links are followed.
1.5 deraadt 93: .It Fl r
94: Generate messages about directories that cannot be read, files
1.12 aaron 95: that cannot be opened, and so on.
1.23 jmc 96: This is the default.
1.19 jmc 97: .It Fl s
1.32 schwarze 98: Display only the total for each of the specified files and directories.
99: Overrides earlier
100: .Fl d
101: options.
1.1 deraadt 102: .It Fl x
1.11 aaron 103: File system mount points are not traversed.
1.1 deraadt 104: .El
1.25 jmc 105: .Pp
106: It is not an error to specify more than one of
107: the mutually exclusive options
108: .Fl h
109: and
110: .Fl k .
111: Where more than one of these options is specified,
112: the last option given overrides the others.
1.1 deraadt 113: .Pp
1.10 aaron 114: .Nm
1.1 deraadt 115: counts the storage used by symbolic links and not the files they
116: reference unless the
117: .Fl H
1.9 aaron 118: or
119: .Fl L
120: option is specified.
1.1 deraadt 121: If either the
122: .Fl H
123: or
124: .Fl L
125: options are specified, storage used by any symbolic links which are
126: followed is not counted or displayed.
127: The
128: .Fl H ,
1.12 aaron 129: .Fl L ,
1.1 deraadt 130: and
131: .Fl P
132: options override each other and the command's actions are determined
133: by the last one specified.
134: .Pp
135: Files having multiple hard links are counted (and displayed) a single
136: time per
1.10 aaron 137: .Nm
1.1 deraadt 138: execution.
1.6 deraadt 139: .Sh ENVIRONMENT
1.1 deraadt 140: .Bl -tag -width BLOCKSIZE
141: .It Ev BLOCKSIZE
1.11 aaron 142: Block counts will be displayed in units of this size block, unless the
1.1 deraadt 143: .Fl k
1.16 pjanzen 144: or
145: .Fl h
146: option is specified.
1.1 deraadt 147: .El
1.28 jmc 148: .Sh EXIT STATUS
149: .Ex -std du
1.1 deraadt 150: .Sh SEE ALSO
151: .Xr df 1 ,
152: .Xr fts 3 ,
153: .Xr symlink 7 ,
154: .Xr quot 8
1.20 jmc 155: .Sh STANDARDS
156: The
157: .Nm
158: utility is compliant with the
1.24 jmc 159: .St -p1003.1-2008
1.20 jmc 160: specification.
161: .Pp
162: The flags
1.32 schwarze 163: .Op Fl cdhP ,
1.30 jmc 164: as well as the
165: .Ev BLOCKSIZE
166: environment variable,
1.20 jmc 167: are extensions to that specification.
1.23 jmc 168: .Pp
169: The flag
170: .Op Fl r
1.31 schwarze 171: is accepted but ignored, for compatibility with systems implementing
172: the obsolete
173: .St -xcu5
174: standard.
1.1 deraadt 175: .Sh HISTORY
1.32 schwarze 176: The
1.10 aaron 177: .Nm
1.32 schwarze 178: utility and its
179: .Fl a
180: and
181: .Fl s
182: options first appeared in
183: .At v1 .
184: .Pp
185: The
186: .Fl r
187: option first appeared in
188: .At III
189: and is available since
190: .Ox 2.3 .
191: The
192: .Fl k
193: and
194: .Fl x
195: options first appeared in
196: .Bx 4.3 Reno
197: and
198: .Fl H
199: in
200: .Bx 4.4 .
201: The
202: .Fl c
203: and
204: .Fl L
205: options first appeared in the GNU fileutils;
206: .Fl L
207: and
208: .Fl P
209: are available since
210: .Bx 4.4 Lite1 ,
211: .Fl c
212: since
213: .Ox 2.1 .
214: The
215: .Fl d
216: option first appeared in
217: .Fx 2.2
218: and is available since
219: .Ox 5.7 ,
220: .Fl h
221: first appeared in
222: .Fx 4.0
223: and is available since
224: .Ox 2.9 .
1.31 schwarze 225: .Sh AUTHORS
226: .An -nosplit
227: This version of
228: .Nm
229: was written by
230: .An Chris Newcomb
231: for
232: .Bx 4.3 Reno
233: in 1989 and incorporates later contributions from
234: .An Elan Amir ,
235: .An Keith Bostic ,
236: .An Luke Mewburn ,
237: .An Matt Bing ,
238: and
239: .An Can Erkin Acar Aq Mt canacar@openbsd.org .