Obfuscate RCS ID matching so that CVS doesn't expand it.
[netbsd-mini2440.git] / bin / df / df.1
bloba1f9266e208c936405f2a2f47c83efe475d69877
1 .\"     $NetBSD: df.1,v 1.42 2008/03/04 17:59:55 christos Exp $
2 .\"
3 .\" Copyright (c) 1989, 1990, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     @(#)df.1        8.2 (Berkeley) 1/13/92
31 .\"
32 .Dd March 4, 2008
33 .Dt DF 1
34 .Os
35 .Sh NAME
36 .Nm df
37 .Nd display free disk space
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl agklmn
41 .Op Fl G | Fl i | Fl P
42 .Op Fl t Ar type
43 .Op Ar file | Ar file_system ...
44 .Sh DESCRIPTION
45 .Nm
46 displays statistics about the amount of free disk space on the specified
47 .Ar file_system
48 or on the file system of which
49 .Ar file
50 is a part.
51 By default, all sizes are reported in 512-byte block counts.
52 If neither a file or a
53 .Ar file_system
54 operand is specified,
55 statistics for all mounted file systems are displayed
56 (subject to the
57 .Fl l
58 and
59 .Fl t
60 options below).
61 .Pp
62 Note that the printed count of available blocks takes
63 .Va minfree
64 into account, and thus will be negative when the number of free blocks
65 on the filesystem is less than
66 .Va minfree .
67 .Pp
68 The following options are available:
69 .Bl -tag -width Ds
70 .It Fl a
71 Show all mount points,
72 including those that were mounted with the
73 .Dv MNT_IGNORE
74 flag.
75 .It Fl G
76 Display all the fields of the structure(s) returned by
77 .Xr statvfs 2 .
78 This option cannot be used with the
79 .Fl i
81 .Fl P
82 options, and it is modelled after the Solaris
83 .Fl g
84 option.
85 This option will override the
86 .Fl g ,
87 .Fl h ,
88 .Fl k ,
89 and
90 .Fl m
91 options, as well as any setting of
92 .Ev BLOCKSIZE .
93 .It Fl g
94 The
95 .Fl g
96 option causes the numbers to be reported in gigabytes (1024*1024*1024
97 bytes).
98 .It Fl h
99 "Human-readable" output.
100 Use unit suffixes: Byte, Kilobyte, Megabyte,
101 Gigabyte, Terabyte, Petabyte, Exabyte in order to reduce the number of
102 digits to four or less.
103 .It Fl i
104 Include statistics on the number of free inodes.
105 .It Fl k
106 By default, all sizes are reported in 512-byte block counts.
108 .Fl k
109 option causes the numbers to be reported in kilobytes (1024 bytes).
110 .It Fl l
111 Display statistics only about mounted file systems with the
112 .Dv MNT_LOCAL
113 flag set.
114 If a non-local file system is given as an argument, a
115 warning is issued and no information is given on that file system.
116 .It Fl m
118 .Fl m
119 option causes the numbers to be reported in megabytes (1024*1024 bytes).
120 .It Fl n
121 Print out the previously obtained statistics from the file systems.
122 This option should be used if it is possible that one or more
123 file systems are in a state such that they will not be able to provide
124 statistics without a long delay.
125 When this option is specified,
127 will not request new statistics from the file systems, but will respond
128 with the possibly stale statistics that were previously obtained.
129 .It Fl P
130 Produce output in the following portable format:
132 If both the
133 .Fl P
135 .Fl k
136 option are specified, the output will be preceded by the following header
137 line, formatted to match the data following it:
138 .Bd -literal
139 "Filesystem 1024-blocks Used Available Capacity Mounted on\\n"
142 If the
143 .Fl P
144 option is specified without the
145 .Fl k
146 options, the output will be preceded by the following header line,
147 formatted to match the data following it:
148 .Bd -literal
149 "Filesystem \*[Lt]blksize\*[Gt]-blocks Used Available Capacity Mounted on\\n"
152 The header line is followed by data formatted as follows:
153 .Bd -literal
154 "%s %d %d %d %d%% %s\\n", \*[Lt]file system name\*[Gt], \*[Lt]total space\*[Gt],
155     \*[Lt]space used\*[Gt], \*[Lt]space free\*[Gt], \*[Lt]percentage used\*[Gt],
156     \*[Lt]file system root\*[Gt]
159 Note that the
160 .Fl i
161 option may not be specified with
162 .Fl P .
163 .It Fl t Ar type
164 Is used to indicate the actions should only be taken on
165 filesystems of the specified type.
166 More than one type may be specified in a comma-separated list.
167 The list of filesystem types can be prefixed with
168 .Dq no
169 to specify the filesystem types for which action should
170 .Em not
171 be taken.
172 If a file system is given on the command line that is not of
173 the specified type, a warning is issued and no information is given on
174 that file system.
176 .Sh ENVIRONMENT
177 .Bl -tag -width BLOCKSIZE
178 .It Ev BLOCKSIZE
179 If the environment variable
180 .Ev BLOCKSIZE
181 is set, and the
182 .Fl g ,
183 .Fl h ,
184 .Fl k
186 .Fl m
187 options are not specified, the block counts will be displayed in units of that
188 size block.
190 .Sh SEE ALSO
191 .Xr quota 1 ,
192 .Xr fstatvfs 2 ,
193 .Xr getvfsstat 2 ,
194 .Xr statvfs 2 ,
195 .Xr getbsize 3 ,
196 .Xr getmntinfo 3 ,
197 .Xr fs 5 ,
198 .Xr fstab 5 ,
199 .Xr mount 8 ,
200 .Xr quot 8 ,
201 .Xr tunefs 8
202 .Sh HISTORY
205 utility appeared in
206 .At v6 .