8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / df.1m
blobcbb11dfca17b7849d5b5f3eca25148a932578986
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited All.  Rights Reserved.
45 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
46 .\"
47 .TH DF 1M "Apr 14, 2016"
48 .SH NAME
49 df \- displays number of free disk blocks and free files
50 .SH SYNOPSIS
51 .LP
52 .nf
53 \fB/usr/bin/df\fR [\fB-F\fR \fIFSType\fR] [\fB-abeghklmnPtVvZ\fR]
54      [\fB-o\fR \fIFSType-specific_options\fR]
55      [\fIblock_device\fR | \fIdirectory\fR | \fIfile\fR | \fIresource\fR ...]
56 .fi
58 .SH DESCRIPTION
59 .LP
60 The \fBdf\fR utility displays the amount of disk space occupied by mounted or
61 unmounted file systems, the amount of used and available space, and how much of
62 the file system's total capacity has been used. The file system is specified by
63 device, or by referring to a file or directory on the specified file system.
64 .sp
65 .LP
66 Used without operands or options, \fBdf\fR reports on all mounted file systems.
67 .sp
68 .LP
69 \fBdf\fR may not be supported for all \fIFSTypes\fR.
70 .sp
71 .LP
72 If \fBdf\fR is run on a networked mount point that the automounter has not yet
73 mounted, the file system size will be reported as zero. As soon as the
74 automounter mounts the file system, the sizes will be reported correctly.
75 .SH OPTIONS
76 .ne 2
77 .na
78 \fB\fB-a\fR\fR
79 .ad
80 .sp .6
81 .RS 4n
82 Reports on all file systems including ones whose entries in \fB/etc/mnttab\fR
83 (see \fBmnttab\fR(4)) have the \fBignore\fR option set.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fB-b\fR\fR
90 .ad
91 .sp .6
92 .RS 4n
93 Prints the total number of kilobytes free.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fB-e\fR\fR
101 .sp .6
102 .RS 4n
103 Prints only the number of files free.
107 .ne 2
109 \fB\fB-F\fR \fIFSType\fR\fR
111 .sp .6
112 .RS 4n
113 Specifies the \fIFSType\fR on which to operate. The \fB-F\fR option is intended
114 for use with unmounted file systems. The \fIFSType\fR should be specified here
115 or be determinable from \fB/etc/vfstab\fR (see \fBvfstab\fR(4)) by matching the
116 \fIdirectory\fR, \fIblock_device\fR, or \fIresource\fR with an entry in the
117 table, or by consulting \fB/etc/default/fs\fR. See \fBdefault_fs\fR(4).
121 .ne 2
123 \fB\fB-g\fR\fR
125 .sp .6
126 .RS 4n
127 Prints the entire \fBstatvfs\fR(2) structure. This option is used only for
128 mounted file systems. It can not be used with the \fB-o\fR option. This option
129 overrides the \fB-b\fR, \fB-e\fR, \fB-k\fR, \fB-n\fR, \fB-P\fR, and \fB-t\fR
130 options.
134 .ne 2
136 \fB\fB-h\fR\fR
138 .sp .6
139 .RS 4n
140 Like \fB-k\fR, except that sizes are in a more human readable format. The
141 output consists of one line of information for each specified file system. This
142 information includes the file system name, the total space allocated in the
143 file system, the amount of space allocated to existing files, the total amount
144 of space available for the creation of new files by unprivileged users, and the
145 percentage of normally available space that is currently allocated to all files
146 on the file system. All sizes are scaled to a human readable format, for
147 example, \fB14K\fR, \fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by
148 repetitively dividing by \fB1024\fR.
150 This option overrides the \fB-b\fR, \fB-e\fR, \fB-g\fR, \fB-k\fR, \fB-n\fR,
151 \fB-t\fR, and \fB-V\fR options. This option only works on mounted filesystems
152 and can not be used together with \fB-o\fR option.
156 .ne 2
158 \fB\fB-k\fR\fR
160 .sp .6
161 .RS 4n
162 Prints the allocation in kbytes. The output consists of one line of information
163 for each specified file system. This information includes the file system name,
164 the total space allocated in the file system, the amount of space allocated to
165 existing files, the total amount of space available for the creation of new
166 files by unprivileged users, and the percentage of normally available space
167 that is currently allocated to all files on the file system. This option
168 overrides the \fB-b\fR, \fB-e\fR, \fB-n\fR, and \fB-t\fR options.
172 .ne 2
174 \fB\fB-l\fR\fR
176 .sp .6
177 .RS 4n
178 Reports on local file systems only. This option is used only for mounted file
179 systems. It can not be used with the \fB-o\fR option.
183 .ne 2
185 \fB\fB-m\fR\fR
187 .sp .6
188 .RS 4n
189 Like -k, except prints the allocation in mbytes.
193 .ne 2
195 \fB\fB-n\fR\fR
197 .sp .6
198 .RS 4n
199 Prints only the \fIFSType\fR name. Invoked with no operands, this option prints
200 a list of mounted file system types. This option is used only for mounted file
201 systems. It can not be used with the \fB-o\fR option.
205 .ne 2
207 \fB\fB-o\fR \fIFSType-specific_options\fR\fR
209 .sp .6
210 .RS 4n
211 Specifies \fIFSType-specific\fR options. These options are comma-separated,
212 with no intervening spaces. See the manual page for the \fIFSType-specific\fR
213 command for details.
217 .ne 2
219 \fB\fB-t\fR\fR
221 .sp .6
222 .RS 4n
223 Prints full listings with totals. This option overrides the \fB-b\fR, \fB-e\fR,
224 and \fB-n\fR options.
228 .ne 2
230 \fB\fB-V\fR\fR
232 .sp .6
233 .RS 4n
234 Echoes the complete set of file system specific command lines, but does not
235 execute them. The command line is generated by using the options and operands
236 provided by the user and adding to them information derived from
237 \fB/etc/mnttab\fR, \fB/etc/vfstab\fR, or \fB/etc/default/fs\fR. This option may
238 be used to verify and validate the command line.
242 .ne 2
244 \fB\fB-Z\fR\fR
246 .sp .6
247 .RS 4n
248 Displays mounts in all visible zones. By default, \fBdf\fR only displays mounts
249 located within the current zone. This option has no effect in a non-global
250 zone.
254 .ne 2
256 \fB\fB-v\fR\fR
258 .sp .6
259 .RS 4n
260 Like \fB-k\fR, except that sizes are displayed in multiples of the smallest
261 block size supported by each specified file system.
263 The output consists of one line of information for each file system. This one
264 line of information includes the following:
265 .RS +4
267 .ie t \(bu
268 .el o
269 the file system's mount point
271 .RS +4
273 .ie t \(bu
274 .el o
275 the file system's name
277 .RS +4
279 .ie t \(bu
280 .el o
281 the total number of blocks allocated to the file system
283 .RS +4
285 .ie t \(bu
286 .el o
287 the number of blocks allocated to existing files
289 .RS +4
291 .ie t \(bu
292 .el o
293 the number of blocks available for the creation of new files by unprivileged
294 users
296 .RS +4
298 .ie t \(bu
299 .el o
300 the percentage of blocks in use by files
305 .ne 2
307 \fB\fB-P\fR\fR
309 .sp .6
310 .RS 4n
311 Same as \fB-h\fR except in 512-byte units.
314 .SH OPERANDS
316 The \fBdf\fR utility interprets operands according to the following precedence:
317 \fIblock_device\fR, \fIdirectory\fR, \fIfile\fR. The following operands are
318 supported:
320 .ne 2
322 \fB\fIblock_device\fR\fR
324 .sp .6
325 .RS 4n
326 Represents a block special device (for example, \fB/dev/dsk/c1d0s7\fR).
330 .ne 2
332 \fB\fIdirectory\fR\fR
334 .sp .6
335 .RS 4n
336 Represents a valid directory name. \fBdf\fR reports on the file system that
337 contains \fIdirectory\fR.
341 .ne 2
343 \fB\fIfile\fR\fR
345 .sp .6
346 .RS 4n
347 Represents a valid file name. \fBdf\fR reports on the file system that contains
348 \fIfile\fR.
352 .ne 2
354 \fB\fIresource\fR\fR
356 .sp .6
357 .RS 4n
358 Represents an \fBNFS\fR resource name.
361 .SH USAGE
363 See \fBlargefile\fR(5) for the description of the behavior of \fBdf\fR when
364 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
365 .SH EXAMPLES
367 \fBExample 1 \fRExecuting the \fBdf\fR command
370 The following example shows the \fBdf\fR command and its output:
373 .in +2
375 example% \fB/usr/bin/df\fR
377 /                  (/dev/dsk/c0t0d0s0 ):  287530 blocks    92028 files
378 /system/contract   (ctfs              ):       0 blocks 2147483572 files
379 /system/object     (objfs             ):       0 blocks 2147483511 files
380 /usr               (/dev/dsk/c0t0d0s6 ): 1020214 blocks   268550 files
381 /proc              (/proc             ):       0 blocks      878 files
382 /dev/fd            (fd                ):       0 blocks        0 files
383 /etc/mnttab        (mnttab            ):       0 blocks        0 files
384 /var/run           (swap              ):  396016 blocks     9375 files
385 /tmp               (swap              ):  396016 blocks     9375 files
386 /opt               (/dev/dsk/c0t0d0s5 ):  381552 blocks    96649 files
387 /export/home       (/dev/dsk/c0t0d0s7 ):  434364 blocks   108220 files
389 .in -2
394 where the columns represent the mount point, device (or "filesystem", according
395 to \fBdf\fR \fB-k\fR), free blocks, and free files, respectively. For contract
396 file systems, \fB/system/contract\fR is the mount point, \fBctfs\fR is the
397 contract file system (used by \fBSMF\fR) with 0 free blocks and
398 2147483582(\fBINTMAX\fR-1) free files. For object file systems,
399 \fB/system/object\fR is the mount point, \fBobjfs\fR is the object file system
400 (see \fBobjfs\fR(7FS)) with 0 free blocks and 2147483511 free files.
402 \fBExample 2 \fRWriting Portable Information About the \fB/usr\fR File System
405 The following example writes portable information about the \fB/usr\fR file
406 system:
409 .in +2
411 example% \fB/usr/bin/df -P /usr\fR
413 .in -2
417 \fBExample 3 \fRWriting Portable Information About the \fB/usr/src\fR file
418 System
421 Assuming that \fB/usr/src\fR is part of the \fB/usr\fR file system, the
422 following example writes portable information :
425 .in +2
427 example% \fB/usr/bin/df -P /usr/src\fR
429 .in -2
433 \fBExample 4 \fRUsing \fBdf\fR to Display Inode Usage
436 The following example displays inode usage on all \fBufs\fR file systems:
439 .in +2
441 example%\fB/usr/bin/df -F ufs -o i\fR
443 .in -2
446 .SH ENVIRONMENT VARIABLES
448 See \fBenviron\fR(5) for descriptions of the following environment variables
449 that affect the execution of \fBdf\fR: \fBLANG\fR, \fBLC_ALL\fR,
450 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
451 .SH EXIT STATUS
453 The following exit values are returned:
455 .ne 2
457 \fB\fB0\fR\fR
459 .sp .6
460 .RS 4n
461 Successful completion.
465 .ne 2
467 \fB\fB>0\fR\fR
469 .sp .6
470 .RS 4n
471 An error occurred.
474 .SH FILES
475 .ne 2
477 \fB\fB/dev/dsk/*\fR\fR
479 .sp .6
480 .RS 4n
481 Disk devices
485 .ne 2
487 \fB\fB/etc/default/fs\fR\fR
489 .sp .6
490 .RS 4n
491 Default local file system type. Default values can be set for the following
492 flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR, where \fBLOCAL\fR
493 is the default partition for a command if no FSType is specified.
497 .ne 2
499 \fB\fB/etc/mnttab\fR\fR
501 .sp .6
502 .RS 4n
503 Mount table
507 .ne 2
509 \fB\fB/etc/vfstab\fR\fR
511 .sp .6
512 .RS 4n
513 List of default parameters for each file system
516 .SH ATTRIBUTES
518 See \fBattributes\fR(5) for descriptions of the following attributes:
521 box;
522 c | c
523 l | l .
524 ATTRIBUTE TYPE  ATTRIBUTE VALUE
526 Interface Stability     Standard
529 .SH SEE ALSO
531 \fBfind\fR(1), \fBdf_ufs\fR(1M), \fBmount\fR(1M), \fBstatvfs\fR(2),
532 \fBdefault_fs\fR(4), \fBmnttab\fR(4), \fBvfstab\fR(4), \fBattributes\fR(5),
533 \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5), \fBobjfs\fR(7FS)
534 .SH NOTES
536 If \fBUFS\fR logging is enabled on a file system, the disk space used for the
537 log is reflected in the \fBdf\fR report. The log is allocated from free blocks
538 on the file system, and it is sized approximately \fB1\fR Mbyte per \fB1\fR
539 Gbyte of file system, up to 256 Mbytes. The log size may be larger  (up to a
540 maximum of 512 Mbytes) depending on the number of  cylinder groups present in
541 the file system.