xref: /netbsd/bin/df/df.1 (revision bf9ec67e)
1.\"	$NetBSD: df.1,v 1.25 2002/02/08 01:21:56 ross 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. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"	@(#)df.1	8.2 (Berkeley) 1/13/92
35.\"
36.Dd January 13, 1994
37.Dt DF 1
38.Os
39.Sh NAME
40.Nm df
41.Nd display free disk space
42.Sh SYNOPSIS
43.Nm
44.Op Fl aiklmnP
45.Op Fl t Ar type
46.Op Ar file | Ar file_system ...
47.Sh DESCRIPTION
48.Nm
49displays statistics about the amount of free disk space on the specified
50.Ar file_system
51or on the file system of which
52.Ar file
53is a part.
54Values are displayed in 512-byte per block block counts.
55If neither a file or a
56.Ar file_system
57operand is specified,
58statistics for all mounted file systems are displayed
59(subject to the
60.Fl l
61and
62.Fl t
63options below).
64.Pp
65Note that the printed count of available blocks takes
66.Va minfree
67into account, and thus will be negative when the number of free blocks
68on the filesystem is less than
69.Va minfree .
70.Pp
71The following options are available:
72.Bl -tag -width Ds
73.It Fl a
74Show all filesystems. By default only filesystems mounted with the
75.Dv MNT_IGNORE
76flag clear are shown.
77.It Fl i
78Include statistics on the number of free inodes.
79.It Fl k
80By default, all sizes are reported in 512-byte block counts.
81The
82.Fl k
83option causes the numbers to be reported in kilobyte (1024 bytes) counts.
84.It Fl l
85Display statistics only about mounted file systems with the
86.Dv MNT_LOCAL
87flag set.  If a non-local file system is given as an argument, a
88warning is issued and no information is given on that file system.
89.It Fl m
90The
91.Fl m
92option causes the numbers to be reported in megabyte (1024*1024 bytes) counts.
93.It Fl n
94Print out the previously obtained statistics from the file systems.
95This option should be used if it is possible that one or more
96file systems are in a state such that they will not be able to provide
97statistics without a long delay.
98When this option is specified,
99.Nm
100will not request new statistics from the file systems, but will respond
101with the possibly stale statistics that were previously obtained.
102.It Fl P
103Produce output in the following portable format:
104.Pp
105If both the
106.Fl P
107and
108.Fl k
109option are specified, the output will be preceded by the following header
110line, formatted to match the data following it:
111.Bd -literal
112"Filesystem 1024-blocks Used Available Capacity Mounted on\\n"
113.Ed
114.Pp
115If the
116.Fl P
117option is specified without the
118.Fl k
119options, the output will be preceded by the following header line,
120formatted to matche the data following it:
121.Bd -literal
122"Filesystem \*[Lt]blksize\*[Gt]-blocks Used Available Capacity Mounted on\\n"
123.Ed
124.Pp
125The header line is followed by data formatted as follows:
126.Bd -literal
127"%s %d %d %d %d%% %s\\n", \*[Lt]file system name\*[Gt], \*[Lt]total space\*[Gt],
128    \*[Lt]space used\*[Gt], \*[Lt]space free\*[Gt], \*[Lt]percentage used\*[Gt],
129    \*[Lt]file system root\*[Gt]
130.Ed
131.It Fl t Ar type
132Is used to indicate the actions should only be taken on
133filesystems of the specified type.
134More than one type may be specified in a comma separated list.
135The list of filesystem types can be prefixed with
136.Dq no
137to specify the filesystem types for which action should
138.Em not
139be taken.  If a file system is given on the command line that is not of
140the specified type, a warning is issued and no information is given on
141that file system.
142.El
143.Sh ENVIRONMENT
144.Bl -tag -width BLOCKSIZE
145.It Ev BLOCKSIZE
146If the environment variable
147.Ev BLOCKSIZE
148is set, and the
149.Fl k
150and
151.Fl m
152options are not specified, the block counts will be displayed in units of that
153size block.
154.El
155.Sh SEE ALSO
156.Xr quota 1 ,
157.Xr fstatfs 2 ,
158.Xr getfsstat 2 ,
159.Xr statfs 2 ,
160.Xr getbsize 3 ,
161.Xr getmntinfo 3 ,
162.Xr fs 5 ,
163.Xr fstab 5 ,
164.Xr mount 8 ,
165.Xr quot 8 ,
166.Xr tunefs 8
167.Sh HISTORY
168A
169.Nm
170utility appeared in
171.At v6 .
172