1.\"	$OpenBSD: df.1,v 1.34 2004/11/17 23:51:01 millert Exp $
2.\"	$NetBSD: df.1,v 1.12 1995/12/05 02:42:45 jtc Exp $
3.\"
4.\" Copyright (c) 1989, 1990, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\"	@(#)df.1	8.2 (Berkeley) 1/13/92
32.\"
33.Dd January 13, 1994
34.Dt DF 1
35.Os
36.Sh NAME
37.Nm df
38.Nd display free disk space
39.Sh SYNOPSIS
40.Nm df
41.Op Fl iklnP
42.Op Fl t Ar type
43.Oo
44.Op Ar file | file_system
45.Ar ...
46.Oc
47.Sh DESCRIPTION
48The
49.Nm
50utility displays statistics about the amount of free disk space on the
51specified
52.Ar file_system
53or on the file system of which
54.Ar file
55is a part.
56By default, values are displayed as 512-byte block counts.
57If neither a file nor a
58.Ar file_system
59operand is specified,
60statistics for all mounted file systems are displayed
61(subject to the
62.Fl l
63and
64.Fl t
65options below).
66.Pp
67The options are as follows:
68.Bl -tag -width Ds
69.It Fl i
70Include statistics on the number of free inodes.
71.It Fl k
72By default, all sizes are reported in 512-byte block counts.
73The
74.Fl k
75option causes the numbers to be reported in kilobyte counts.
76.It Fl l
77Display statistics only about mounted file systems with the
78.Dv MNT_LOCAL
79flag set.
80If a non-local file system is given as an argument, a
81warning is issued and no information is given on that file system.
82.It Fl n
83Print out the previously obtained statistics from the file systems.
84This option should be used if it is possible that one or more
85file systems are in a state such that they will not be able to provide
86statistics without a long delay.
87When this option is specified,
88.Nm
89will not request new statistics from the file systems, but will respond
90with the possibly stale statistics that were previously obtained.
91.It Fl P
92Print out information in a stricter format designed to be parsed
93by portable scripts.
94.It Fl t Ar type
95Indicate the actions should only be taken on
96file systems of the specified
97.Ar type .
98More than one type may be specified in a comma-separated list.
99The list of file system types can be prefixed with
100.Dq no
101to specify the file system types for which action should
102.Em not
103be taken.
104If a file system is given on the command line that is not of
105the specified type, a warning is issued and no information is given on
106that file system.
107.El
108.Sh ENVIRONMENT
109.Bl -tag -width BLOCKSIZE
110.It Ev BLOCKSIZE
111If the environment variable
112.Ev BLOCKSIZE
113is set, and the
114.Fl k
115options are not specified, the block counts will be displayed in units of that
116size block.
117.El
118.Sh EXAMPLES
119.Li $ df -kP /usr
120.Pp
121Output, in a strict format suitable for portable scripts, disk space
122statistics for the
123.Pa /usr
124file system using kilobyte block sizes.
125.Sh DIAGNOSTICS
126The
127.Nm
128utility exits with one of the following values:
129.Pp
130.Bl -tag -width flag
131.It Li 0
132Successful completion.
133.It Li \*(Gt0
134An error occurred.
135.El
136.Sh SEE ALSO
137.Xr quota 1 ,
138.Xr fstatfs 2 ,
139.Xr getfsstat 2 ,
140.Xr statfs 2 ,
141.Xr getmntinfo 3 ,
142.Xr fstab 5 ,
143.Xr mount 8 ,
144.Xr quot 8
145.Sh STANDARDS
146The
147.Nm
148utility is compliant with the
149.St -p1003.2-92
150specification.
151.Sh HISTORY
152A
153.Nm
154utility appeared in
155.At v3 .
156