Annotation of src/usr.bin/du/du.1, Revision 1.15
1.15 ! aaron 1: .\" $OpenBSD: du.1,v 1.14 2001/02/23 19:14:20 pjanzen 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.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)du.1 8.2 (Berkeley) 4/1/94
36: .\"
1.4 millert 37: .Dd October 4, 1996
1.1 deraadt 38: .Dt DU 1
39: .Os
40: .Sh NAME
41: .Nm du
42: .Nd display disk usage statistics
43: .Sh SYNOPSIS
44: .Nm du
45: .Op Fl H | Fl L | Fl P
46: .Op Fl a | Fl s
1.14 pjanzen 47: .Op Fl chkrx
1.1 deraadt 48: .Op Ar file ...
49: .Sh DESCRIPTION
50: The
1.10 aaron 51: .Nm
1.8 aaron 52: utility displays the file system block usage for each
53: .Ar file
54: argument
1.1 deraadt 55: and for each directory in the file hierarchy rooted in each directory
1.12 aaron 56: argument.
57: Note that the system block usage is usually greater than
1.7 millert 58: the actual size of the file.
1.1 deraadt 59: If no file is specified, the block usage of the hierarchy rooted in
60: the current directory is displayed.
61: .Pp
62: The options are as follows:
63: .Bl -tag -width Ds
64: .It Fl H
65: Symbolic links on the command line are followed.
66: (Symbolic links encountered in the tree traversal are not followed.)
67: .It Fl L
68: All symbolic links are followed.
69: .It Fl P
70: No symbolic links are followed.
71: .It Fl a
72: Display an entry for each file in the file hierarchy.
73: .It Fl k
74: By default,
1.10 aaron 75: .Nm
1.1 deraadt 76: displays the number of blocks as returned by the
1.10 aaron 77: .Xr stat 2
1.13 aaron 78: system call, i.e., 512-byte blocks.
1.1 deraadt 79: If the
80: .Fl k
81: flag is specified, the number displayed is the number of 1024-byte
82: blocks.
83: Partial numbers of blocks are rounded up.
1.4 millert 84: .It Fl c
85: Display the grand total after all the arguments have been processed.
1.14 pjanzen 86: .It Fl h
87: Display numbers in a human readable form.
88: Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte in order to
89: reduce the number of digits to four or less.
90: This overrides the
91: .Fl k
92: option.
1.1 deraadt 93: .It Fl s
94: Display only the grand total for the specified files.
1.5 deraadt 95: .It Fl r
96: Generate messages about directories that cannot be read, files
1.12 aaron 97: that cannot be opened, and so on.
98: This is the default case.
1.5 deraadt 99: This option exists solely for conformance with
100: .St -xpg4 .
1.1 deraadt 101: .It Fl x
1.11 aaron 102: File system mount points are not traversed.
1.1 deraadt 103: .El
104: .Pp
1.10 aaron 105: .Nm
1.1 deraadt 106: counts the storage used by symbolic links and not the files they
107: reference unless the
108: .Fl H
1.9 aaron 109: or
110: .Fl L
111: option is specified.
1.1 deraadt 112: If either the
113: .Fl H
114: or
115: .Fl L
116: options are specified, storage used by any symbolic links which are
117: followed is not counted or displayed.
118: The
119: .Fl H ,
1.12 aaron 120: .Fl L ,
1.1 deraadt 121: and
122: .Fl P
123: options override each other and the command's actions are determined
124: by the last one specified.
125: .Pp
126: Files having multiple hard links are counted (and displayed) a single
127: time per
1.10 aaron 128: .Nm
1.1 deraadt 129: execution.
1.6 deraadt 130: .Sh ENVIRONMENT
1.1 deraadt 131: .Bl -tag -width BLOCKSIZE
132: .It Ev BLOCKSIZE
1.11 aaron 133: Block counts will be displayed in units of this size block, unless the
1.1 deraadt 134: .Fl k
1.11 aaron 135: option is also specified.
1.1 deraadt 136: .El
137: .Sh SEE ALSO
138: .Xr df 1 ,
139: .Xr fts 3 ,
140: .Xr symlink 7 ,
141: .Xr quot 8
142: .Sh HISTORY
143: A
1.10 aaron 144: .Nm
1.1 deraadt 145: command appeared in
146: .At v6 .