1.\" $OpenBSD: df.1,v 1.49 2022/12/31 21:47:53 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 $Mdocdate: December 31 2022 $ 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. 56By default, values are displayed as 512-byte block counts. 57If no operands are specified, 58statistics for all mounted file systems are displayed 59(subject to the 60.Fl l 61and 62.Fl t 63options, below). 64.Pp 65The options are as follows: 66.Bl -tag -width Ds 67.It Fl h 68"Human-readable" output. 69Use unit suffixes: Byte, Kilobyte, Megabyte, 70Gigabyte, Terabyte, Petabyte, Exabyte in order to reduce the number of 71digits to four or less. 72This option is incompatible with the 73.Fl P 74option. 75.It Fl i 76Include statistics on the number of free inodes. 77This option is incompatible with the 78.Fl P 79option. 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. 103The 104.Ev BLOCKSIZE 105environment variable is ignored when this option is specified. 106.It Fl t Ar type 107Indicate the actions should only be taken on 108file systems of the specified 109.Ar type . 110More than one type may be specified in a comma-separated list. 111The list of file system types can be prefixed with 112.Dq no 113to specify the file system types for which action should 114.Em not 115be taken. 116If a file system is given on the command line that is not of 117the specified type, a warning is issued and no information is given on 118that file system. 119.El 120.Pp 121It is not an error to specify more than one of 122the mutually exclusive options 123.Fl h 124and 125.Fl k . 126Where more than one of these options is specified, 127the last option given overrides the others. 128.Sh ENVIRONMENT 129.Bl -tag -width BLOCKSIZE 130.It Ev BLOCKSIZE 131Display block counts in units of size 132.Dv BLOCKSIZE . 133Ignored if any of the 134.Fl h , k 135or 136.Fl P 137options are specified. 138.El 139.Sh EXIT STATUS 140.Ex -std df 141.Sh EXAMPLES 142Output, in a strict format suitable for portable scripts, disk space 143statistics for the 144.Pa /usr 145file system using kilobyte block sizes: 146.Pp 147.Dl $ df -kP /usr 148.Sh SEE ALSO 149.Xr quota 1 , 150.Xr getfsstat 2 , 151.Xr statfs 2 , 152.Xr getmntinfo 3 , 153.Xr fstab 5 , 154.Xr mount 8 , 155.Xr quot 8 156.Sh STANDARDS 157The 158.Nm 159utility is compliant with the 160.St -p1003.1-2008 161specification. 162.Pp 163The flags 164.Op Fl hiln , 165as well as the 166.Ev BLOCKSIZE 167environment variable, 168are extensions to that specification. 169.Pp 170This implementation provides the traditional 171.Bx 172.Fl t 173behaviour, 174which differs from the 175X/Open System Interfaces option 176specification. 177.Sh HISTORY 178A 179.Nm 180utility appeared in 181.At v1 . 182