summaryrefslogtreecommitdiffstats
path: root/man1/df.1
blob: 3c5a32693ab38ea8329150809d7525d4f5470d7b (plain) (blame)
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
.\" Copyright Andries Brouwer, Ragnar Hojland Espinosa and A. Wik, 1998.
.\"
.\" This file may be copied under the conditions described
.\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998
.\" that should have been distributed together with this file.
.\"
.TH DF 1 1998-11 "GNU fileutils 4.0"
.SH NAME
df \- report filesystem disk space usage
.SH SYNOPSIS
.BI "df [" options "] [" file... ]
.sp
POSIX options:
.B "[\-kP] [\-\-]"
.sp
GNU options (shortest form):
.B [\-ahHiklmPv]
.BI "[\-t " fstype ]
.BI "[\-x " fstype ]
.BI "[\-\-block\-size=" size ]
.B [\-\-print\-type]
.B [\-\-no\-sync]
.B [\-\-sync]
.B "[\-\-help] [\-\-version] [\-\-]"
.SH DESCRIPTION
.B df
reports the amount of disk space used and available on
filesystems.
.PP
With no arguments,
.B df
reports the space used and available on all
currently mounted filesystems (of all types).
Otherwise,
.B df
reports on the filesystem containing each argument
.IR file .
.SH "POSIX DETAILS"
The output is in 512-byte units by default, but in
1024-byte units when the \-k option is given.
The output format is undefined, unless the \-P option is given.
If
.I file
is not a regular file, a directory or a FIFO, the result
is unspecified.
.SH "GNU DETAILS"
The output is in 1024-byte units (when no units are
specified by options), unless the environment variable
.B POSIXLY_CORRECT
is set, in which case POSIX is followed.
.PP
If an argument
.I file
is a disk device file containing a mounted filesystem,
.B df
shows the space available on that filesystem rather
than on the filesystem containing the device node.
.SH "POSIX OPTIONS"
.TP
.B "\-k"
Use 1024-byte units instead of the default 512-byte units.
.TP
.B "\-P"
Output in six columns, with heading `Filesystem N-blocks
Used Available Capacity Mounted on' (with N=512, but N=1024
when the \-k option is given).
.TP
.B "\-\-"
Terminate option list.
.SH "GNU OPTIONS"
.TP
.B "\-a, \-\-all"
Include in the listing filesystems that have a size of 0 blocks,
which are omitted by default.  Such filesystems are typically
special-purpose pseudo-filesystems, such as automounter entries.
Also, filesystems of type "ignore" or "auto", supported by some
operating systems, are only included if this option is specified.
.TP
.BI "\-\-block\-size=" size
Print sizes in blocks of
.I size
bytes. (New but broken in fileutils-4.0.)
.TP
.B "\-h, \-\-human\-readable"
Append a size letter such as
.B M
for binary megabytes (`mebibytes') to each size.
.TP
.B "\-H, \-\-si"
Do the same as for
.BR \-h ,
but use the official SI units (with powers of 1000 instead of 1024,
so that M stands for 1000000 instead of 1048576).
(New in fileutils-4.0.)
.TP
.B "\-i, \-\-inodes"
List inode usage information instead of block usage.  An inode
(short for index node) contains information about a file such
as its owner, permissions, timestamps, and location on the disk.
.TP
.B "\-k, \-\-kilobytes"
Print sizes in 1024-byte blocks.
.TP
.B "\-l, \-\-local"
Limit the output to local filesystems only.
(New in fileutils-4.0.)
.TP
.B "\-m, \-\-megabytes"
Print sizes in binary megabyte (that's 1048576 bytes) blocks.
Note that the four options \-h, \-H, \-k, \-m are mutually exclusive
and only the last one is effective; for example, it is not the case
that giving both the \-\-si and \-m options would result in output
in (actual, 1000000-byte) megabytes. [The interpretation of blocksizes
is also influenced by the environment variable BLOCK_SIZE, but this
does not work in the fileutils-4.0 version.]
.TP
.B "\-\-no\-sync"
Do not invoke the
.B sync
system call before getting any usage data.
This may make
.B df
run significantly faster, but on some systems (notably SunOS)
the results may be slightly out of date.  This is the default.
.TP
.B "\-P, \-\-portability"
Use the
.SM POSIX
output format.  This is like the default format
except that the information about each filesystem is always
printed on exactly one line; a mount device is never put on a line
by itself.  This means that if the mount device name is more than
20 characters long (e.g., for some network mounts), the columns
are misaligned.
.TP
.B "\-\-sync"
Invoke the
.B sync
system call before getting any usage data.  On some systems 
(notably SunOS), doing this yields more up to date results,
but in general this option makes
.B df
much slower, especially when there are many or very busy filesystems.
.TP
.BI "\-t " "fstype, " "\-\-type=" "fstype"
Limit the listing to filesystems of type
.IR fstype .
Multiple filesystem types can be specified by giving multiple
.B \-t
options. By default, nothing is omitted.
.TP
.B "\-T, \-\-print\-type"
Print each filesystem's type.
The types given are those reported by the system
(and are found in a system-dependent way, for example by reading
.IR /etc/mtab ).
See also
.BR mount (8).
.TP
.BI "\-x " "fstype, " "\-\-exclude\-type=" "fstype"
Limit the listing to filesystems not of type
.I fstype.
Multiple filesystem types can be eliminated by giving multiple
.B "\-x"
options.  By default, no filesystem types are omitted.
.TP
.B "\-v"
Ignored; for compatibility with System V versions of
.B df.
.SH "GNU STANDARD OPTIONS"
.TP
.B "\-\-help"
Print a usage message on standard output and exit successfully.
.TP
.B "\-\-version"
Print version information on standard output, then exit successfully.
.TP
.B "\-\-"
Terminate option list.
.SH ENVIRONMENT
The variable POSIXLY_CORRECT determines the choice of unit.
If it is not set, and the variable BLOCKSIZE has a value starting
with `HUMAN', then behaviour is as for the \-h option,
unless overridden by \-k or \-m options.
The variables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have the
usual meaning.
.SH "CONFORMING TO"
POSIX 1003.2
.SH "SEE ALSO"
.BR mount (8)
.SH NOTES
This page describes
.B df
as found in the fileutils-4.0 package;
other versions may differ slightly.