xref: /original-bsd/usr.bin/du/du.1 (revision ea3a8ee8)
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.18 (Berkeley) 07/27/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 Hhx
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 H
39When encountering a symbolic link on the command line, follow it.  All other
40symbolic links encountered in the traversal are not followed.
41.It Fl h
42When encountering a symbolic link anywhere in the traversal, follow it.
43.It Fl x
44Filesystem mount points are not traversed.
45.El
46.Pp
47.Nm Du
48references symbolic links as the links themselves unless the
49.Fl H
50or
51.Fl h
52flags are specified, in which case behavior is as detailed above.
53.Pp
54Files having multiple hard links are counted (and displayed) a single
55time per
56.Nm du
57execution.
58.Sh ENVIRONMENTAL VARIABLES
59.Bl -tag -width BLOCKSIZE
60.It Ev BLOCKSIZE
61If the environmental variable
62.Ev BLOCKSIZE
63is set, the block counts will be displayed in units of that size block.
64.El
65.Sh SEE ALSO
66.Xr df 1 ,
67.Xr fts 3 ,
68.Xr symlink 7 ,
69.Xr quot 8
70.Sh HISTORY
71A
72.Nm du
73command appeared in
74.At v6 .
75