386BSD 0.1 development
[unix-history] / usr / src / usr.bin / du / du.1
CommitLineData
b4f5c217
WJ
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
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.\" @(#)du.1 6.13 (Berkeley) 6/20/91
33.\"
34.Dd June 20, 1991
35.Dt DU 1
36.Os BSD 4.4
37.Sh NAME
38.Nm du
39.Nd Display disk usage statistics
40.Sh SYNOPSIS
41.Nm du
42.Op Fl a Li \&| Fl s
43.Op Fl kx
44.Op Ar file ...
45.Sh DESCRIPTION
46The
47.Nm du
48utility displays the file system block usage for each file argument
49and for each directory in the file hierarchy rooted in each directory
50argument.
51If no file is specified, the block usage of the hierarchy rooted in
52the current directory is displayed.
53.Pp
54The options are as follows:
55.Bl -tag -width Ds
56.It Fl a
57Display an entry for each file in the file hierarchy.
58.It Fl k
59By default,
60.Nm du
61displays the number of blocks as returned by the
62.Xr stat 2
63system call, i.e. 512-byte blocks.
64If the
65.Fl k
66flag is specified, the number displayed is the number of 1024-byte
67blocks.
68Partial numbers of blocks are rounded up.
69.It Fl s
70Display only the grand total for the specified files.
71.It Fl x
72Filesystem mount points are not traversed.
73.El
74.Pp
75If
76.Ar file
77is a symbolic link referencing an existing file, the file referenced
78by the link is reported on instead of the link itself.
79.Pp
80Files having multiple hard links are counted (and displayed) a single
81time per
82.Nm du
83execution.
84.Sh SEE ALSO
85.Xr df 1 ,
86.Xr quot 8
87.Sh HISTORY
88A
89.Nm
90command appeared in
91.At v6 .