xref: /original-bsd/usr.bin/du/du.1 (revision b5fdb4ed)
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.13 (Berkeley) 06/20/91
7.\"
8.Dd
9.Dt DU 1
10.Os BSD 4.4
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 kx
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.
27.Pp
28The options are as follows:
29.Bl -tag -width Ds
30.It Fl a
31Display an entry for each file in the file hierarchy.
32.It Fl k
33By default,
34.Nm du
35displays the number of blocks as returned by the
36.Xr stat  2
37system call, i.e. 512-byte blocks.
38If the
39.Fl k
40flag is specified, the number displayed is the number of 1024-byte
41blocks.
42Partial numbers of blocks are rounded up.
43.It Fl s
44Display only the grand total for the specified files.
45.It Fl x
46Filesystem mount points are not traversed.
47.El
48.Pp
49If
50.Ar file
51is a symbolic link referencing an existing file, the file referenced
52by the link is reported on instead of the link itself.
53.Pp
54Files having multiple hard links are counted (and displayed) a single
55time per
56.Nm du
57execution.
58.Sh SEE ALSO
59.Xr df 1 ,
60.Xr quot 8
61.Sh HISTORY
62A
63.Nm
64command appeared in
65.At v6 .
66