2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
7 .\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
8 .\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
9 .\" This notice shall appear on any product containing this material.
10 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
11 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
12 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
13 .TH DF 1M "Apr 14, 2016"
15 df \- displays number of free disk blocks and free files
19 \fB/usr/bin/df\fR [\fB-F\fR \fIFSType\fR] [\fB-abeghklmnPtVvZ\fR]
20 [\fB-o\fR \fIFSType-specific_options\fR]
21 [\fIblock_device\fR | \fIdirectory\fR | \fIfile\fR | \fIresource\fR ...]
26 The \fBdf\fR utility displays the amount of disk space occupied by mounted or
27 unmounted file systems, the amount of used and available space, and how much of
28 the file system's total capacity has been used. The file system is specified by
29 device, or by referring to a file or directory on the specified file system.
32 Used without operands or options, \fBdf\fR reports on all mounted file systems.
35 \fBdf\fR may not be supported for all \fIFSTypes\fR.
38 If \fBdf\fR is run on a networked mount point that the automounter has not yet
39 mounted, the file system size will be reported as zero. As soon as the
40 automounter mounts the file system, the sizes will be reported correctly.
48 Reports on all file systems including ones whose entries in \fB/etc/mnttab\fR
49 (see \fBmnttab\fR(4)) have the \fBignore\fR option set.
59 Prints the total number of kilobytes free.
69 Prints only the number of files free.
75 \fB\fB-F\fR \fIFSType\fR\fR
79 Specifies the \fIFSType\fR on which to operate. The \fB-F\fR option is intended
80 for use with unmounted file systems. The \fIFSType\fR should be specified here
81 or be determinable from \fB/etc/vfstab\fR (see \fBvfstab\fR(4)) by matching the
82 \fIdirectory\fR, \fIblock_device\fR, or \fIresource\fR with an entry in the
83 table, or by consulting \fB/etc/default/fs\fR. See \fBdefault_fs\fR(4).
93 Prints the entire \fBstatvfs\fR(2) structure. This option is used only for
94 mounted file systems. It can not be used with the \fB-o\fR option. This option
95 overrides the \fB-b\fR, \fB-e\fR, \fB-k\fR, \fB-n\fR, \fB-P\fR, and \fB-t\fR
106 Like \fB-k\fR, except that sizes are in a more human readable format. The
107 output consists of one line of information for each specified file system. This
108 information includes the file system name, the total space allocated in the
109 file system, the amount of space allocated to existing files, the total amount
110 of space available for the creation of new files by unprivileged users, and the
111 percentage of normally available space that is currently allocated to all files
112 on the file system. All sizes are scaled to a human readable format, for
113 example, \fB14K\fR, \fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by
114 repetitively dividing by \fB1024\fR.
116 This option overrides the \fB-b\fR, \fB-e\fR, \fB-g\fR, \fB-k\fR, \fB-n\fR,
117 \fB-t\fR, and \fB-V\fR options. This option only works on mounted filesystems
118 and can not be used together with \fB-o\fR option.
128 Prints the allocation in kbytes. The output consists of one line of information
129 for each specified file system. This information includes the file system name,
130 the total space allocated in the file system, the amount of space allocated to
131 existing files, the total amount of space available for the creation of new
132 files by unprivileged users, and the percentage of normally available space
133 that is currently allocated to all files on the file system. This option
134 overrides the \fB-b\fR, \fB-e\fR, \fB-n\fR, and \fB-t\fR options.
144 Reports on local file systems only. This option is used only for mounted file
145 systems. It can not be used with the \fB-o\fR option.
155 Like -k, except prints the allocation in mbytes.
165 Prints only the \fIFSType\fR name. Invoked with no operands, this option prints
166 a list of mounted file system types. This option is used only for mounted file
167 systems. It can not be used with the \fB-o\fR option.
173 \fB\fB-o\fR \fIFSType-specific_options\fR\fR
177 Specifies \fIFSType-specific\fR options. These options are comma-separated,
178 with no intervening spaces. See the manual page for the \fIFSType-specific\fR
189 Prints full listings with totals. This option overrides the \fB-b\fR, \fB-e\fR,
190 and \fB-n\fR options.
200 Echoes the complete set of file system specific command lines, but does not
201 execute them. The command line is generated by using the options and operands
202 provided by the user and adding to them information derived from
203 \fB/etc/mnttab\fR, \fB/etc/vfstab\fR, or \fB/etc/default/fs\fR. This option may
204 be used to verify and validate the command line.
214 Displays mounts in all visible zones. By default, \fBdf\fR only displays mounts
215 located within the current zone. This option has no effect in a non-global
226 Like \fB-k\fR, except that sizes are displayed in multiples of the smallest
227 block size supported by each specified file system.
229 The output consists of one line of information for each file system. This one
230 line of information includes the following:
235 the file system's mount point
241 the file system's name
247 the total number of blocks allocated to the file system
253 the number of blocks allocated to existing files
259 the number of blocks available for the creation of new files by unprivileged
266 the percentage of blocks in use by files
277 Same as \fB-h\fR except in 512-byte units.
282 The \fBdf\fR utility interprets operands according to the following precedence:
283 \fIblock_device\fR, \fIdirectory\fR, \fIfile\fR. The following operands are
288 \fB\fIblock_device\fR\fR
292 Represents a block special device (for example, \fB/dev/dsk/c1d0s7\fR).
298 \fB\fIdirectory\fR\fR
302 Represents a valid directory name. \fBdf\fR reports on the file system that
303 contains \fIdirectory\fR.
313 Represents a valid file name. \fBdf\fR reports on the file system that contains
324 Represents an \fBNFS\fR resource name.
329 See \fBlargefile\fR(5) for the description of the behavior of \fBdf\fR when
330 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
333 \fBExample 1 \fRExecuting the \fBdf\fR command
336 The following example shows the \fBdf\fR command and its output:
341 example% \fB/usr/bin/df\fR
343 / (/dev/dsk/c0t0d0s0 ): 287530 blocks 92028 files
344 /system/contract (ctfs ): 0 blocks 2147483572 files
345 /system/object (objfs ): 0 blocks 2147483511 files
346 /usr (/dev/dsk/c0t0d0s6 ): 1020214 blocks 268550 files
347 /proc (/proc ): 0 blocks 878 files
348 /dev/fd (fd ): 0 blocks 0 files
349 /etc/mnttab (mnttab ): 0 blocks 0 files
350 /var/run (swap ): 396016 blocks 9375 files
351 /tmp (swap ): 396016 blocks 9375 files
352 /opt (/dev/dsk/c0t0d0s5 ): 381552 blocks 96649 files
353 /export/home (/dev/dsk/c0t0d0s7 ): 434364 blocks 108220 files
360 where the columns represent the mount point, device (or "filesystem", according
361 to \fBdf\fR \fB-k\fR), free blocks, and free files, respectively. For contract
362 file systems, \fB/system/contract\fR is the mount point, \fBctfs\fR is the
363 contract file system (used by \fBSMF\fR) with 0 free blocks and
364 2147483582(\fBINTMAX\fR-1) free files. For object file systems,
365 \fB/system/object\fR is the mount point, \fBobjfs\fR is the object file system
366 (see \fBobjfs\fR(7FS)) with 0 free blocks and 2147483511 free files.
368 \fBExample 2 \fRWriting Portable Information About the \fB/usr\fR File System
371 The following example writes portable information about the \fB/usr\fR file
377 example% \fB/usr/bin/df -P /usr\fR
383 \fBExample 3 \fRWriting Portable Information About the \fB/usr/src\fR file
387 Assuming that \fB/usr/src\fR is part of the \fB/usr\fR file system, the
388 following example writes portable information :
393 example% \fB/usr/bin/df -P /usr/src\fR
399 \fBExample 4 \fRUsing \fBdf\fR to Display Inode Usage
402 The following example displays inode usage on all \fBufs\fR file systems:
407 example%\fB/usr/bin/df -F ufs -o i\fR
412 .SH ENVIRONMENT VARIABLES
414 See \fBenviron\fR(5) for descriptions of the following environment variables
415 that affect the execution of \fBdf\fR: \fBLANG\fR, \fBLC_ALL\fR,
416 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
419 The following exit values are returned:
427 Successful completion.
443 \fB\fB/dev/dsk/*\fR\fR
453 \fB\fB/etc/default/fs\fR\fR
457 Default local file system type. Default values can be set for the following
458 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR, where \fBLOCAL\fR
459 is the default partition for a command if no FSType is specified.
465 \fB\fB/etc/mnttab\fR\fR
475 \fB\fB/etc/vfstab\fR\fR
479 List of default parameters for each file system
484 See \fBattributes\fR(5) for descriptions of the following attributes:
490 ATTRIBUTE TYPE ATTRIBUTE VALUE
492 Interface Stability Standard
497 \fBfind\fR(1), \fBdf_ufs\fR(1M), \fBmount\fR(1M), \fBstatvfs\fR(2),
498 \fBdefault_fs\fR(4), \fBmnttab\fR(4), \fBvfstab\fR(4), \fBattributes\fR(5),
499 \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5), \fBobjfs\fR(7FS)
502 If \fBUFS\fR logging is enabled on a file system, the disk space used for the
503 log is reflected in the \fBdf\fR report. The log is allocated from free blocks
504 on the file system, and it is sized approximately \fB1\fR Mbyte per \fB1\fR
505 Gbyte of file system, up to 256 Mbytes. The log size may be larger (up to a
506 maximum of 512 Mbytes) depending on the number of cylinder groups present in