xref: /openbsd/bin/df/df.1 (revision db3296cf)
1.\"	$OpenBSD: df.1,v 1.31 2003/06/02 23:32:07 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 hiklnP
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.
56Values are displayed in 512-byte per block 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 h
70"Human-readable" output.
71Use unit suffixes: Byte, Kilobyte, Megabyte,
72Gigabyte, Terabyte, Petabyte, Exabyte in order to reduce the number of
73digits to four or less.
74.It Fl i
75Include statistics on the number of free inodes.
76.It Fl k
77By default, all sizes are reported in 512-byte block counts.
78The
79.Fl k
80option causes the numbers to be reported in kilobyte counts.
81.It Fl l
82Display statistics only about mounted file systems with the
83.Dv MNT_LOCAL
84flag set.
85If a non-local file system is given as an argument, a
86warning is issued and no information is given on that file system.
87.It Fl n
88Print out the previously obtained statistics from the file systems.
89This option should be used if it is possible that one or more
90file systems are in a state such that they will not be able to provide
91statistics without a long delay.
92When this option is specified,
93.Nm
94will not request new statistics from the file systems, but will respond
95with the possibly stale statistics that were previously obtained.
96.It Fl P
97Print out information in a stricter format designed to be parsed
98by portable scripts.
99.It Fl t Ar type
100Indicate the actions should only be taken on
101file systems of the specified
102.Ar type .
103More than one type may be specified in a comma separated list.
104The list of file system types can be prefixed with
105.Dq no
106to specify the file system types for which action should
107.Em not
108be taken.
109If a file system is given on the command line that is not of
110the specified type, a warning is issued and no information is given on
111that file system.
112.El
113.Sh ENVIRONMENT
114.Bl -tag -width BLOCKSIZE
115.It Ev BLOCKSIZE
116If the environment variable
117.Ev BLOCKSIZE
118is set, and the
119.Fl k
120option is not specified, the block counts will be displayed in units of that
121size block.
122.El
123.Sh EXAMPLES
124.Li $ df -kP /usr
125.Pp
126Output, in a strict format suitable for portable scripts, disk space
127statistics for the
128.Pa /usr
129file system using kilobyte block sizes.
130.Sh SEE ALSO
131.Xr quota 1 ,
132.Xr fstatfs 2 ,
133.Xr getfsstat 2 ,
134.Xr statfs 2 ,
135.Xr getmntinfo 3 ,
136.Xr fstab 5 ,
137.Xr mount 8 ,
138.Xr quot 8
139.Sh STANDARDS
140The
141.Nm
142utility is compliant with the
143.St -p1003.2-92
144specification.
145.Sh HISTORY
146A
147.Nm
148utility appeared in
149.At v3 .
150