summaryrefslogtreecommitdiffstats
path: root/man/du.1
blob: 8c28ba26b9dcb9cff77188bdd01723ec3c7616fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.48.5.
.TH DU "1" "April 2022" "GNU coreutils 9.1" "User Commands"
.SH NAME
du \- estimate file space usage
.SH SYNOPSIS
.B du
[\fI\,OPTION\/\fR]... [\fI\,FILE\/\fR]...
.br
.B du
[\fI\,OPTION\/\fR]... \fI\,--files0-from=F\/\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
Summarize device usage of the set of FILEs, recursively for directories.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\fB\-0\fR, \fB\-\-null\fR
end each output line with NUL, not newline
.TP
\fB\-a\fR, \fB\-\-all\fR
write counts for all files, not just directories
.TP
\fB\-\-apparent\-size\fR
print apparent sizes rather than device usage; although
the apparent size is usually smaller, it may be
larger due to holes in ('sparse') files, internal
fragmentation, indirect blocks, and the like
.TP
\fB\-B\fR, \fB\-\-block\-size\fR=\fI\,SIZE\/\fR
scale sizes by SIZE before printing them; e.g.,
\&'\-BM' prints sizes in units of 1,048,576 bytes;
see SIZE format below
.TP
\fB\-b\fR, \fB\-\-bytes\fR
equivalent to '\-\-apparent\-size \fB\-\-block\-size\fR=\fI\,1\/\fR'
.TP
\fB\-c\fR, \fB\-\-total\fR
produce a grand total
.TP
\fB\-D\fR, \fB\-\-dereference\-args\fR
dereference only symlinks that are listed on the
command line
.TP
\fB\-d\fR, \fB\-\-max\-depth\fR=\fI\,N\/\fR
print the total for a directory (or file, with \fB\-\-all\fR)
only if it is N or fewer levels below the command
line argument;  \fB\-\-max\-depth\fR=\fI\,0\/\fR is the same as
\fB\-\-summarize\fR
.TP
\fB\-\-files0\-from\fR=\fI\,F\/\fR
summarize device usage of the
NUL\-terminated file names specified in file F;
if F is \-, then read names from standard input
.TP
\fB\-H\fR
equivalent to \fB\-\-dereference\-args\fR (\fB\-D\fR)
.TP
\fB\-h\fR, \fB\-\-human\-readable\fR
print sizes in human readable format (e.g., 1K 234M 2G)
.TP
\fB\-\-inodes\fR
list inode usage information instead of block usage
.TP
\fB\-k\fR
like \fB\-\-block\-size\fR=\fI\,1K\/\fR
.TP
\fB\-L\fR, \fB\-\-dereference\fR
dereference all symbolic links
.TP
\fB\-l\fR, \fB\-\-count\-links\fR
count sizes many times if hard linked
.TP
\fB\-m\fR
like \fB\-\-block\-size\fR=\fI\,1M\/\fR
.TP
\fB\-P\fR, \fB\-\-no\-dereference\fR
don't follow any symbolic links (this is the default)
.TP
\fB\-S\fR, \fB\-\-separate\-dirs\fR
for directories do not include size of subdirectories
.TP
\fB\-\-si\fR
like \fB\-h\fR, but use powers of 1000 not 1024
.TP
\fB\-s\fR, \fB\-\-summarize\fR
display only a total for each argument
.TP
\fB\-t\fR, \fB\-\-threshold\fR=\fI\,SIZE\/\fR
exclude entries smaller than SIZE if positive,
or entries greater than SIZE if negative
.TP
\fB\-\-time\fR
show time of the last modification of any file in the
directory, or any of its subdirectories
.TP
\fB\-\-time\fR=\fI\,WORD\/\fR
show time as WORD instead of modification time:
atime, access, use, ctime or status
.TP
\fB\-\-time\-style\fR=\fI\,STYLE\/\fR
show times using STYLE, which can be:
full\-iso, long\-iso, iso, or +FORMAT;
FORMAT is interpreted like in 'date'
.TP
\fB\-X\fR, \fB\-\-exclude\-from\fR=\fI\,FILE\/\fR
exclude files that match any pattern in FILE
.TP
\fB\-\-exclude\fR=\fI\,PATTERN\/\fR
exclude files that match PATTERN
.TP
\fB\-x\fR, \fB\-\-one\-file\-system\fR
skip directories on different file systems
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit
.PP
Display values are in units of the first available SIZE from \fB\-\-block\-size\fR,
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).
.PP
The SIZE argument is an integer and optional unit (example: 10K is 10*1024).
Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).
Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
.SH PATTERNS
PATTERN is a shell pattern (not a regular expression).  The pattern
.B ?\&
matches any one character, whereas
.B *
matches any string (composed of zero, one or multiple characters).  For
example,
.B *.o
will match any files whose names end in
.BR .o .
Therefore, the command
.IP
.B du \-\-exclude=\(aq*.o\(aq
.PP
will skip all files and subdirectories ending in
.B .o
(including the file
.B .o
itself).
.SH AUTHOR
Written by Torbjorn Granlund, David MacKenzie, Paul Eggert,
and Jim Meyering.
.SH "REPORTING BUGS"
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
.br
Report any translation bugs to <https://translationproject.org/team/>
.SH COPYRIGHT
Copyright \(co 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
Full documentation <https://www.gnu.org/software/coreutils/du>
.br
or available locally via: info \(aq(coreutils) du invocation\(aq