6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / df.1m
blobd2cde5eb5f3057858bd72efd77b65289ff63ec4f
1 '\" te
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"
14 .SH NAME
15 df \- displays number of free disk blocks and free files
16 .SH SYNOPSIS
17 .LP
18 .nf
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 ...]
22 .fi
24 .SH DESCRIPTION
25 .sp
26 .LP
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.
31 .sp
32 .LP
33 Used without operands or options, \fBdf\fR reports on all mounted file systems.
34 .sp
35 .LP
36 \fBdf\fR may not be supported for all \fIFSTypes\fR.
37 .sp
38 .LP
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.
42 .SH OPTIONS
43 .sp
44 .ne 2
45 .na
46 \fB\fB-a\fR\fR
47 .ad
48 .sp .6
49 .RS 4n
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.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fB-b\fR\fR
58 .ad
59 .sp .6
60 .RS 4n
61 Prints the total number of kilobytes free.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fB-e\fR\fR
68 .ad
69 .sp .6
70 .RS 4n
71 Prints only the number of files free.
72 .RE
74 .sp
75 .ne 2
76 .na
77 \fB\fB-F\fR \fIFSType\fR\fR
78 .ad
79 .sp .6
80 .RS 4n
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).
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fB-g\fR\fR
92 .ad
93 .sp .6
94 .RS 4n
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
98 options.
99 .RE
102 .ne 2
104 \fB\fB-h\fR\fR
106 .sp .6
107 .RS 4n
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.
124 .ne 2
126 \fB\fB-k\fR\fR
128 .sp .6
129 .RS 4n
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.
140 .ne 2
142 \fB\fB-l\fR\fR
144 .sp .6
145 .RS 4n
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.
151 .ne 2
153 \fB\fB-m\fR\fR
155 .sp .6
156 .RS 4n
157 Like -k, except prints the allocation in mbytes.
161 .ne 2
163 \fB\fB-n\fR\fR
165 .sp .6
166 .RS 4n
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.
173 .ne 2
175 \fB\fB-o\fR \fIFSType-specific_options\fR\fR
177 .sp .6
178 .RS 4n
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
181 command for details.
185 .ne 2
187 \fB\fB-t\fR\fR
189 .sp .6
190 .RS 4n
191 Prints full listings with totals. This option overrides the \fB-b\fR, \fB-e\fR,
192 and \fB-n\fR options.
196 .ne 2
198 \fB\fB-V\fR\fR
200 .sp .6
201 .RS 4n
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.
210 .ne 2
212 \fB\fB-Z\fR\fR
214 .sp .6
215 .RS 4n
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
218 zone.
222 .ne 2
224 \fB\fB-v\fR\fR
226 .sp .6
227 .RS 4n
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:
233 .RS +4
235 .ie t \(bu
236 .el o
237 the file system's mount point
239 .RS +4
241 .ie t \(bu
242 .el o
243 the file system's name
245 .RS +4
247 .ie t \(bu
248 .el o
249 the total number of blocks allocated to the file system
251 .RS +4
253 .ie t \(bu
254 .el o
255 the number of blocks allocated to existing files
257 .RS +4
259 .ie t \(bu
260 .el o
261 the number of blocks available for the creation of new files by unprivileged
262 users
264 .RS +4
266 .ie t \(bu
267 .el o
268 the percentage of blocks in use by files
273 .ne 2
275 \fB\fB-P\fR\fR
277 .sp .6
278 .RS 4n
279 Same as \fB-h\fR except in 512-byte units.
282 .SH OPERANDS
285 The \fBdf\fR utility interprets operands according to the following precedence:
286 \fIblock_device\fR, \fIdirectory\fR, \fIfile\fR. The following operands are
287 supported:
289 .ne 2
291 \fB\fIblock_device\fR\fR
293 .sp .6
294 .RS 4n
295 Represents a block special device (for example, \fB/dev/dsk/c1d0s7\fR).
299 .ne 2
301 \fB\fIdirectory\fR\fR
303 .sp .6
304 .RS 4n
305 Represents a valid directory name. \fBdf\fR reports on the file system that
306 contains \fIdirectory\fR.
310 .ne 2
312 \fB\fIfile\fR\fR
314 .sp .6
315 .RS 4n
316 Represents a valid file name. \fBdf\fR reports on the file system that contains
317 \fIfile\fR.
321 .ne 2
323 \fB\fIresource\fR\fR
325 .sp .6
326 .RS 4n
327 Represents an \fBNFS\fR resource name.
330 .SH USAGE
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).
335 .SH EXAMPLES
337 \fBExample 1 \fRExecuting the \fBdf\fR command
340 The following example shows the \fBdf\fR command and its output:
343 .in +2
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
359 .in -2
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
376 system:
379 .in +2
381 example% \fB/usr/bin/df -P /usr\fR
383 .in -2
387 \fBExample 3 \fRWriting Portable Information About the \fB/usr/src\fR file
388 System
391 Assuming that \fB/usr/src\fR is part of the \fB/usr\fR file system, the
392 following example writes portable information :
395 .in +2
397 example% \fB/usr/bin/df -P /usr/src\fR
399 .in -2
403 \fBExample 4 \fRUsing \fBdf\fR to Display Inode Usage
406 The following example displays inode usage on all \fBufs\fR file systems:
409 .in +2
411 example%\fB/usr/bin/df -F ufs -o i\fR
413 .in -2
416 .SH ENVIRONMENT VARIABLES
418 .ne 2
420 \fB\fBSYSV3\fR\fR
422 .sp .6
423 .RS 4n
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.
436 .SH EXIT STATUS
439 The following exit values are returned:
441 .ne 2
443 \fB\fB0\fR\fR
445 .sp .6
446 .RS 4n
447 Successful completion.
451 .ne 2
453 \fB\fB>0\fR\fR
455 .sp .6
456 .RS 4n
457 An error occurred.
460 .SH FILES
462 .ne 2
464 \fB\fB/dev/dsk/*\fR\fR
466 .sp .6
467 .RS 4n
468 Disk devices
472 .ne 2
474 \fB\fB/etc/default/fs\fR\fR
476 .sp .6
477 .RS 4n
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.
484 .ne 2
486 \fB\fB/etc/mnttab\fR\fR
488 .sp .6
489 .RS 4n
490 Mount table
494 .ne 2
496 \fB\fB/etc/vfstab\fR\fR
498 .sp .6
499 .RS 4n
500 List of default parameters for each file system
503 .SH ATTRIBUTES
506 See \fBattributes\fR(5) for descriptions of the following attributes:
509 box;
510 c | c
511 l | l .
512 ATTRIBUTE TYPE  ATTRIBUTE VALUE
514 Interface Stability     Standard
517 .SH SEE ALSO
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)
523 .SH NOTES
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
531 the file system.