xref: /original-bsd/usr.bin/du/du.1 (revision 753853ba)
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)du.1	6.15 (Berkeley) 03/01/92
7.\"
8.Dd
9.Dt DU 1
10.Os
11.Sh NAME
12.Nm du
13.Nd display disk usage statistics
14.Sh SYNOPSIS
15.Nm du
16.Op Fl a Li \&| Fl s
17.Op Fl x
18.Op Ar file ...
19.Sh DESCRIPTION
20The
21.Nm du
22utility displays the file system block usage for each file argument
23and for each directory in the file hierarchy rooted in each directory
24argument.
25If no file is specified, the block usage of the hierarchy rooted in
26the current directory is displayed.
27The number of blocks are in the same units as that returned by the
28.Xr stat 2
29system call, i.e. 512-byte blocks.
30Partial numbers of blocks are rounded up.
31.Pp
32The options are as follows:
33.Bl -tag -width Ds
34.It Fl a
35Display an entry for each file in the file hierarchy.
36.It Fl s
37Display only the grand total for the specified files.
38.It Fl x
39Filesystem mount points are not traversed.
40.El
41.Pp
42If
43.Ar file
44is a symbolic link referencing an existing file, the file referenced
45by the link is reported on instead of the link itself.
46.Pp
47Files having multiple hard links are counted (and displayed) a single
48time per
49.Nm du
50execution.
51.Sh ENVIRONMENTAL VARIABLES
52.Bl -tag -width BLOCKSIZE
53.It Ev BLOCKSIZE
54If the environmental variable
55.Ev BLOCKSIZE
56is set, the block counts will be displayed in units of that size block.
57.El
58.Sh SEE ALSO
59.Xr df 1 ,
60.Xr quot 8
61.Sh HISTORY
62A
63.Nm du
64command appeared in
65.At v6 .
66