file_cmds-202.2.tar.gz
[apple/file_cmds.git] / df / df.1
1 .\" Copyright (c) 1989, 1990, 1993
2 .\"     The Regents of the University of California.  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 .\"
32 .\"     @(#)df.1        8.3 (Berkeley) 5/8/95
33 .\" $FreeBSD: src/bin/df/df.1,v 1.18.2.7 2002/04/22 22:17:36 keramida Exp $
34 .\"
35 .Dd May 8, 1995
36 .Dt DF 1
37 .Os
38 .Sh NAME
39 .Nm df
40 .Nd display free disk space
41 .Sh SYNOPSIS
42 .Nm df
43 .Oo
44 .Fl b | h | H | k |
45 .Fl m | g | P
46 .Oc
47 .Op Fl ailn
48 .Op Fl t
49 .Op Fl T Ar type
50 .Op Ar file | filesystem ...
51 .Sh LEGACY SYNOPSIS
52 .Nm df
53 .Oo
54 .Fl b | h | H | k |
55 .Fl m | P
56 .Oc
57 .Op Fl ailn
58 .Op Fl t Ar type
59 .Op Fl T Ar type
60 .Op Ar file | filesystem ...
61 .Sh DESCRIPTION
62 The
63 .Nm df
64 utility
65 displays statistics about the amount of free disk space on the specified
66 .Ar filesystem
67 or on the filesystem of which
68 .Ar file
69 is a part.
70 Values are displayed in 512-byte per block counts.
71 If neither a file or a filesystem operand is specified,
72 statistics for all mounted filesystems are displayed
73 (subject to the
74 .Fl t
75 option below).
76 .Pp
77 The following options are available:
78 .Bl -tag -width Ds
79 .It Fl a
80 Show all mount points, including those that were mounted with the MNT_IGNORE
81 flag.
82 .It Fl b
83 Use (the default) 512-byte blocks.
84 This is only useful as a way to override an
85 .Ev BLOCKSIZE
86 specification from the environment.
87 .It Fl g
88 Use 1073741824-byte (1-Gbyte) blocks rather than the default.
89 Note that this overrides the
90 .Ev BLOCKSIZE
91 specification from the environment.
92 .It Fl H
93 "Human-readable" output.  Use unit suffixes: Byte, Kilobyte, Megabyte,
94 Gigabyte, Terabyte and Petabyte in order to reduce the number of
95 digits to three or less using base 10 for sizes.
96 .It Fl h
97 "Human-readable" output.  Use unit suffixes: Byte, Kilobyte, Megabyte,
98 Gigabyte, Terabyte and Petabyte in order to reduce the number of
99 digits to three or less using base 2 for sizes.
100 .It Fl i
101 Include statistics on the number of free inodes.
102 .It Fl k
103 Use 1024-byte (1-Kbyte) blocks, rather than the default.
104 Note that this overrides the
105 .Ev BLOCKSIZE
106 specification from the environment.
107 .It Fl l
108 Only display information about locally-mounted filesystems.
109 .It Fl m
110 Use 1048576-byte (1-Mbyte) blocks rather than the default.  Note that
111 this overrides the
112 .Ev BLOCKSIZE
113 specification from the environment.
114 .It Fl n
115 Print out the previously obtained statistics from the filesystems.
116 This option should be used if it is possible that one or more
117 filesystems are in a state such that they will not be able to provide
118 statistics without a long delay.
119 When this option is specified,
120 .Nm df
121 will not request new statistics from the filesystems, but will respond
122 with the possibly stale statistics that were previously obtained.
123 .It Fl P
124 Use (the default) 512-byte blocks.
125 This is only useful as a way to override an
126 .Ev BLOCKSIZE
127 specification from the environment.
128 .It Fl T
129 Only print out statistics for filesystems of the specified types.
130 More than one type may be specified in a comma separated list.
131 The list of filesystem types can be prefixed with
132 .Dq no
133 to specify the filesystem types for which action should
134 .Em not
135 be taken.
136 For example, the
137 .Nm df
138 command:
139 .Bd -literal -offset indent
140 df -T nonfs,mfs
141 .Ed
142 .Pp
143 lists all filesystems except those of type
144 .Tn NFS
145 and
146 .Tn MFS .
147 The
148 .Xr lsvfs 1
149 command can be used to find out the types of filesystems
150 that are available on the system.
151 .It Fl t
152 If used with no arguments,
153 this option is a no-op
154 (Mac OS X already prints the total allocated-space figures).
155 If used with an argument, it acts like
156 .Fl T ,
157 but this usage is deprecated and should not be relied upon.
158 .El
159 .Sh ENVIRONMENT
160 .Bl -tag -width BLOCKSIZE
161 .It Ev BLOCKSIZE
162 If the environment variable
163 .Ev BLOCKSIZE
164 is set, the block counts will be displayed in units of that size block.
165 .El
166 .Sh BUGS
167 The
168 .Fl n
169 and
170 .Fl t
171 flags are ignored if a file or filesystem is specified.
172 .Sh LEGACY DESCRIPTION
173 The "capacity" percentage is normally rounded up to the next higher integer.
174 In legacy mode, it is rounded down to the next lower integer.
175 .Pp
176 When the
177 .Fl P
178 option and the
179 .Fl k
180 option are used together,
181 sizes are reported in 1024-blocks.
182 In legacy mode, when the
183 .Fl P
184 option and
185 .Fl k
186 option are used together,
187 the last option specified dictates the reported block size.
188 .Pp
189 The
190 .Fl t
191 option is normally a no-op
192 (Mac OS X already prints the total allocated-space figures).
193 In legacy mode, it is equivalent to
194 .Fl T .
195 .Pp
196 For more information about legacy mode, see
197 .Xr compat 5 .
198 .Sh SEE ALSO
199 .Xr lsvfs 1 ,
200 .Xr quota 1 ,
201 .Xr fstatfs 2 ,
202 .Xr getfsstat 2 ,
203 .Xr statfs 2 ,
204 .Xr getmntinfo 3 ,
205 .Xr compat 5 ,
206 .Xr fstab 5 ,
207 .Xr mount 8 ,
208 .Xr quot 8
209 .Sh HISTORY
210 A
211 .Nm df
212 command appeared in
213 .At v1 .