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 "Nov 15, 2012"
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 ...]
27 The \fBdf\fR utility displays the amount of disk space occupied by mounted or
28 unmounted file systems, the amount of used and available space, and how much of
29 the file system's total capacity has been used. The file system is specified by
30 device, or by referring to a file or directory on the specified file system.
33 Used without operands or options, \fBdf\fR reports on all mounted file systems.
36 \fBdf\fR may not be supported for all \fIFSTypes\fR.
39 If \fBdf\fR is run on a networked mount point that the automounter has not yet
40 mounted, the file system size will be reported as zero. As soon as the
41 automounter mounts the file system, the sizes will be reported correctly.
50 Reports on all file systems including ones whose entries in \fB/etc/mnttab\fR
51 (see \fBmnttab\fR(4)) have the \fBignore\fR option set.
61 Prints the total number of kilobytes free.
71 Prints only the number of files free.
77 \fB\fB-F\fR \fIFSType\fR\fR
81 Specifies the \fIFSType\fR on which to operate. The \fB-F\fR option is intended
82 for use with unmounted file systems. The \fIFSType\fR should be specified here
83 or be determinable from \fB/etc/vfstab\fR (see \fBvfstab\fR(4)) by matching the
84 \fIdirectory\fR, \fIblock_device\fR, or \fIresource\fR with an entry in the
85 table, or by consulting \fB/etc/default/fs\fR. See \fBdefault_fs\fR(4).
95 Prints the entire \fBstatvfs\fR(2) structure. This option is used only for
96 mounted file systems. It can not be used with the \fB-o\fR option. This option
97 overrides the \fB-b\fR, \fB-e\fR, \fB-k\fR, \fB-n\fR, \fB-P\fR, and \fB-t\fR
108 Like \fB-k\fR, except that sizes are in a more human readable format. The
109 output consists of one line of information for each specified file system. This
110 information includes the file system name, the total space allocated in the
111 file system, the amount of space allocated to existing files, the total amount
112 of space available for the creation of new files by unprivileged users, and the
113 percentage of normally available space that is currently allocated to all files
114 on the file system. All sizes are scaled to a human readable format, for
115 example, \fB14K\fR, \fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by
116 repetitively dividing by \fB1024\fR.
118 This option overrides the \fB-b\fR, \fB-e\fR, \fB-g\fR, \fB-k\fR, \fB-n\fR,
119 \fB-t\fR, and \fB-V\fR options. This option only works on mounted filesystems
120 and can not be used together with \fB-o\fR option.
130 Prints the allocation in kbytes. The output consists of one line of information
131 for each specified file system. This information includes the file system name,
132 the total space allocated in the file system, the amount of space allocated to
133 existing files, the total amount of space available for the creation of new
134 files by unprivileged users, and the percentage of normally available space
135 that is currently allocated to all files on the file system. This option
136 overrides the \fB-b\fR, \fB-e\fR, \fB-n\fR, and \fB-t\fR options.
146 Reports on local file systems only. This option is used only for mounted file
147 systems. It can not be used with the \fB-o\fR option.
157 Like -k, except prints the allocation in mbytes.
167 Prints only the \fIFSType\fR name. Invoked with no operands, this option prints
168 a list of mounted file system types. This option is used only for mounted file
169 systems. It can not be used with the \fB-o\fR option.
175 \fB\fB-o\fR \fIFSType-specific_options\fR\fR
179 Specifies \fIFSType-specific\fR options. These options are comma-separated,
180 with no intervening spaces. See the manual page for the \fIFSType-specific\fR
191 Prints full listings with totals. This option overrides the \fB-b\fR, \fB-e\fR,
192 and \fB-n\fR options.
202 Echoes the complete set of file system specific command lines, but does not
203 execute them. The command line is generated by using the options and operands
204 provided by the user and adding to them information derived from
205 \fB/etc/mnttab\fR, \fB/etc/vfstab\fR, or \fB/etc/default/fs\fR. This option may
206 be used to verify and validate the command line.
216 Displays mounts in all visible zones. By default, \fBdf\fR only displays mounts
217 located within the current zone. This option has no effect in a non-global
228 Like \fB-k\fR, except that sizes are displayed in multiples of the smallest
229 block size supported by each specified file system.
231 The output consists of one line of information for each file system. This one
232 line of information includes the following:
237 the file system's mount point
243 the file system's name
249 the total number of blocks allocated to the file system
255 the number of blocks allocated to existing files
261 the number of blocks available for the creation of new files by unprivileged
268 the percentage of blocks in use by files
279 Same as \fB-h\fR except in 512-byte units.
285 The \fBdf\fR utility interprets operands according to the following precedence:
286 \fIblock_device\fR, \fIdirectory\fR, \fIfile\fR. The following operands are
291 \fB\fIblock_device\fR\fR
295 Represents a block special device (for example, \fB/dev/dsk/c1d0s7\fR).
301 \fB\fIdirectory\fR\fR
305 Represents a valid directory name. \fBdf\fR reports on the file system that
306 contains \fIdirectory\fR.
316 Represents a valid file name. \fBdf\fR reports on the file system that contains
327 Represents an \fBNFS\fR resource name.
333 See \fBlargefile\fR(5) for the description of the behavior of \fBdf\fR when
334 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
337 \fBExample 1 \fRExecuting the \fBdf\fR command
340 The following example shows the \fBdf\fR command and its output:
345 example% \fB/usr/bin/df\fR
347 / (/dev/dsk/c0t0d0s0 ): 287530 blocks 92028 files
348 /system/contract (ctfs ): 0 blocks 2147483572 files
349 /system/object (objfs ): 0 blocks 2147483511 files
350 /usr (/dev/dsk/c0t0d0s6 ): 1020214 blocks 268550 files
351 /proc (/proc ): 0 blocks 878 files
352 /dev/fd (fd ): 0 blocks 0 files
353 /etc/mnttab (mnttab ): 0 blocks 0 files
354 /var/run (swap ): 396016 blocks 9375 files
355 /tmp (swap ): 396016 blocks 9375 files
356 /opt (/dev/dsk/c0t0d0s5 ): 381552 blocks 96649 files
357 /export/home (/dev/dsk/c0t0d0s7 ): 434364 blocks 108220 files
364 where the columns represent the mount point, device (or "filesystem", according
365 to \fBdf\fR \fB-k\fR), free blocks, and free files, respectively. For contract
366 file systems, \fB/system/contract\fR is the mount point, \fBctfs\fR is the
367 contract file system (used by \fBSMF\fR) with 0 free blocks and
368 2147483582(\fBINTMAX\fR-1) free files. For object file systems,
369 \fB/system/object\fR is the mount point, \fBobjfs\fR is the object file system
370 (see \fBobjfs\fR(7FS)) with 0 free blocks and 2147483511 free files.
372 \fBExample 2 \fRWriting Portable Information About the \fB/usr\fR File System
375 The following example writes portable information about the \fB/usr\fR file
381 example% \fB/usr/bin/df -P /usr\fR
387 \fBExample 3 \fRWriting Portable Information About the \fB/usr/src\fR file
391 Assuming that \fB/usr/src\fR is part of the \fB/usr\fR file system, the
392 following example writes portable information :
397 example% \fB/usr/bin/df -P /usr/src\fR
403 \fBExample 4 \fRUsing \fBdf\fR to Display Inode Usage
406 The following example displays inode usage on all \fBufs\fR file systems:
411 example%\fB/usr/bin/df -F ufs -o i\fR
416 .SH ENVIRONMENT VARIABLES
424 This variable is used to override the default behavior of \fBdf\fR and provide
425 compatibility with INTERACTIVE UNIX System and \fBSCO\fR UNIX installation
426 scripts. As the \fBSYSV3\fR variable is provided for compatibility purposes
427 only, it should not be used in new scripts.
432 When set, any header which normally displays "files" will now display "nodes".
433 See \fBenviron\fR(5) for descriptions of the following environment variables
434 that affect the execution of \fBdf\fR: \fBLANG\fR, \fBLC_ALL\fR,
435 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
439 The following exit values are returned:
447 Successful completion.
464 \fB\fB/dev/dsk/*\fR\fR
474 \fB\fB/etc/default/fs\fR\fR
478 Default local file system type. Default values can be set for the following
479 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR, where \fBLOCAL\fR
480 is the default partition for a command if no FSType is specified.
486 \fB\fB/etc/mnttab\fR\fR
496 \fB\fB/etc/vfstab\fR\fR
500 List of default parameters for each file system
506 See \fBattributes\fR(5) for descriptions of the following attributes:
512 ATTRIBUTE TYPE ATTRIBUTE VALUE
514 Interface Stability Standard
520 \fBfind\fR(1), \fBdf_ufs\fR(1M), \fBmount\fR(1M), \fBstatvfs\fR(2),
521 \fBdefault_fs\fR(4), \fBmnttab\fR(4), \fBvfstab\fR(4), \fBattributes\fR(5),
522 \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5), \fBobjfs\fR(7FS)
526 If \fBUFS\fR logging is enabled on a file system, the disk space used for the
527 log is reflected in the \fBdf\fR report. The log is allocated from free blocks
528 on the file system, and it is sized approximately \fB1\fR Mbyte per \fB1\fR
529 Gbyte of file system, up to 256 Mbytes. The log size may be larger (up to a
530 maximum of 512 Mbytes) depending on the number of cylinder groups present in