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