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