Commit | Line | Data |
---|---|---|
15637ed4 RG |
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 | .\" | |
4e97a0eb | 32 | .\" @(#)du.1 6.15 (Berkeley) 3/1/92 |
15637ed4 | 33 | .\" |
4e97a0eb | 34 | .Dd March 1, 1992 |
15637ed4 | 35 | .Dt DU 1 |
4e97a0eb | 36 | .Os |
15637ed4 RG |
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 | |
ad401f1c | 43 | .Op Fl kx |
15637ed4 RG |
44 | .Op Ar file ... |
45 | .Sh DESCRIPTION | |
46 | The | |
47 | .Nm du | |
ad401f1c NW |
48 | utility displays the file system block usage for each file |
49 | argument and for each directory in the file hierarchy rooted in each directory | |
15637ed4 RG |
50 | argument. |
51 | If no file is specified, the block usage of the hierarchy rooted in | |
52 | the current directory is displayed. | |
4e97a0eb NW |
53 | The number of blocks are in the same units as that returned by the |
54 | .Xr stat 2 | |
ad401f1c NW |
55 | system call, i.e. 512-byte blocks, unless the |
56 | .Fl k | |
57 | option is specified, or the | |
58 | .Ev BLOCKSIZE | |
59 | environment variable is set (see below). | |
4e97a0eb | 60 | Partial numbers of blocks are rounded up. |
15637ed4 RG |
61 | .Pp |
62 | The options are as follows: | |
63 | .Bl -tag -width Ds | |
64 | .It Fl a | |
65 | Display an entry for each file in the file hierarchy. | |
15637ed4 RG |
66 | .It Fl s |
67 | Display only the grand total for the specified files. | |
ad401f1c NW |
68 | .It Fl k |
69 | The block counts are forced to be in 1K (1024 8-bit bytes) size blocks. | |
15637ed4 RG |
70 | .It Fl x |
71 | Filesystem mount points are not traversed. | |
72 | .El | |
73 | .Pp | |
74 | If | |
75 | .Ar file | |
76 | is a symbolic link referencing an existing file, the file referenced | |
77 | by the link is reported on instead of the link itself. | |
78 | .Pp | |
79 | Files having multiple hard links are counted (and displayed) a single | |
80 | time per | |
81 | .Nm du | |
82 | execution. | |
4e97a0eb NW |
83 | .Sh ENVIRONMENTAL VARIABLES |
84 | .Bl -tag -width BLOCKSIZE | |
85 | .It Ev BLOCKSIZE | |
86 | If the environmental variable | |
87 | .Ev BLOCKSIZE | |
88 | is set, the block counts will be displayed in units of that size block. | |
89 | .El | |
15637ed4 RG |
90 | .Sh SEE ALSO |
91 | .Xr df 1 , | |
92 | .Xr quot 8 | |
93 | .Sh HISTORY | |
94 | A | |
4e97a0eb | 95 | .Nm du |
15637ed4 RG |
96 | command appeared in |
97 | .At v6 . |