1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
|
.\"
.\" 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/.
.\"
.\" 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 are reprinted and reproduced in electronic form
.\" in the SunOS 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 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.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" 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.
.\" 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
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\"
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited All. Rights Reserved.
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\"
.TH DF 1M "Apr 14, 2016"
.SH NAME
df \- displays number of free disk blocks and free files
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/df\fR [\fB-F\fR \fIFSType\fR] [\fB-abeghklmnPtVvZ\fR]
[\fB-o\fR \fIFSType-specific_options\fR]
[\fIblock_device\fR | \fIdirectory\fR | \fIfile\fR | \fIresource\fR ...]
.fi
.SH DESCRIPTION
.LP
The \fBdf\fR utility displays the amount of disk space occupied by mounted or
unmounted file systems, the amount of used and available space, and how much of
the file system's total capacity has been used. The file system is specified by
device, or by referring to a file or directory on the specified file system.
.sp
.LP
Used without operands or options, \fBdf\fR reports on all mounted file systems.
.sp
.LP
\fBdf\fR may not be supported for all \fIFSTypes\fR.
.sp
.LP
If \fBdf\fR is run on a networked mount point that the automounter has not yet
mounted, the file system size will be reported as zero. As soon as the
automounter mounts the file system, the sizes will be reported correctly.
.SH OPTIONS
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.sp .6
.RS 4n
Reports on all file systems including ones whose entries in \fB/etc/mnttab\fR
(see \fBmnttab\fR(4)) have the \fBignore\fR option set.
.RE
.sp
.ne 2
.na
\fB\fB-b\fR\fR
.ad
.sp .6
.RS 4n
Prints the total number of kilobytes free.
.RE
.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.sp .6
.RS 4n
Prints only the number of files free.
.RE
.sp
.ne 2
.na
\fB\fB-F\fR \fIFSType\fR\fR
.ad
.sp .6
.RS 4n
Specifies the \fIFSType\fR on which to operate. The \fB-F\fR option is intended
for use with unmounted file systems. The \fIFSType\fR should be specified here
or be determinable from \fB/etc/vfstab\fR (see \fBvfstab\fR(4)) by matching the
\fIdirectory\fR, \fIblock_device\fR, or \fIresource\fR with an entry in the
table, or by consulting \fB/etc/default/fs\fR. See \fBdefault_fs\fR(4).
.RE
.sp
.ne 2
.na
\fB\fB-g\fR\fR
.ad
.sp .6
.RS 4n
Prints the entire \fBstatvfs\fR(2) structure. This option is used only for
mounted file systems. It can not be used with the \fB-o\fR option. This option
overrides the \fB-b\fR, \fB-e\fR, \fB-k\fR, \fB-n\fR, \fB-P\fR, and \fB-t\fR
options.
.RE
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.sp .6
.RS 4n
Like \fB-k\fR, except that sizes are in a more human readable format. The
output consists of one line of information for each specified file system. This
information includes the file system name, the total space allocated in the
file system, the amount of space allocated to existing files, the total amount
of space available for the creation of new files by unprivileged users, and the
percentage of normally available space that is currently allocated to all files
on the file system. All sizes are scaled to a human readable format, for
example, \fB14K\fR, \fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by
repetitively dividing by \fB1024\fR.
.sp
This option overrides the \fB-b\fR, \fB-e\fR, \fB-g\fR, \fB-k\fR, \fB-n\fR,
\fB-t\fR, and \fB-V\fR options. This option only works on mounted filesystems
and can not be used together with \fB-o\fR option.
.RE
.sp
.ne 2
.na
\fB\fB-k\fR\fR
.ad
.sp .6
.RS 4n
Prints the allocation in kbytes. The output consists of one line of information
for each specified file system. This information includes the file system name,
the total space allocated in the file system, the amount of space allocated to
existing files, the total amount of space available for the creation of new
files by unprivileged users, and the percentage of normally available space
that is currently allocated to all files on the file system. This option
overrides the \fB-b\fR, \fB-e\fR, \fB-n\fR, and \fB-t\fR options.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.sp .6
.RS 4n
Reports on local file systems only. This option is used only for mounted file
systems. It can not be used with the \fB-o\fR option.
.RE
.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.sp .6
.RS 4n
Like -k, except prints the allocation in mbytes.
.RE
.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
Prints only the \fIFSType\fR name. Invoked with no operands, this option prints
a list of mounted file system types. This option is used only for mounted file
systems. It can not be used with the \fB-o\fR option.
.RE
.sp
.ne 2
.na
\fB\fB-o\fR \fIFSType-specific_options\fR\fR
.ad
.sp .6
.RS 4n
Specifies \fIFSType-specific\fR options. These options are comma-separated,
with no intervening spaces. See the manual page for the \fIFSType-specific\fR
command for details.
.RE
.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.sp .6
.RS 4n
Prints full listings with totals. This option overrides the \fB-b\fR, \fB-e\fR,
and \fB-n\fR options.
.RE
.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.sp .6
.RS 4n
Echoes the complete set of file system specific command lines, but does not
execute them. The command line is generated by using the options and operands
provided by the user and adding to them information derived from
\fB/etc/mnttab\fR, \fB/etc/vfstab\fR, or \fB/etc/default/fs\fR. This option may
be used to verify and validate the command line.
.RE
.sp
.ne 2
.na
\fB\fB-Z\fR\fR
.ad
.sp .6
.RS 4n
Displays mounts in all visible zones. By default, \fBdf\fR only displays mounts
located within the current zone. This option has no effect in a non-global
zone.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
Like \fB-k\fR, except that sizes are displayed in multiples of the smallest
block size supported by each specified file system.
.sp
The output consists of one line of information for each file system. This one
line of information includes the following:
.RS +4
.TP
.ie t \(bu
.el o
the file system's mount point
.RE
.RS +4
.TP
.ie t \(bu
.el o
the file system's name
.RE
.RS +4
.TP
.ie t \(bu
.el o
the total number of blocks allocated to the file system
.RE
.RS +4
.TP
.ie t \(bu
.el o
the number of blocks allocated to existing files
.RE
.RS +4
.TP
.ie t \(bu
.el o
the number of blocks available for the creation of new files by unprivileged
users
.RE
.RS +4
.TP
.ie t \(bu
.el o
the percentage of blocks in use by files
.RE
.RE
.sp
.ne 2
.na
\fB\fB-P\fR\fR
.ad
.sp .6
.RS 4n
Same as \fB-h\fR except in 512-byte units.
.RE
.SH OPERANDS
.LP
The \fBdf\fR utility interprets operands according to the following precedence:
\fIblock_device\fR, \fIdirectory\fR, \fIfile\fR. The following operands are
supported:
.sp
.ne 2
.na
\fB\fIblock_device\fR\fR
.ad
.sp .6
.RS 4n
Represents a block special device (for example, \fB/dev/dsk/c1d0s7\fR).
.RE
.sp
.ne 2
.na
\fB\fIdirectory\fR\fR
.ad
.sp .6
.RS 4n
Represents a valid directory name. \fBdf\fR reports on the file system that
contains \fIdirectory\fR.
.RE
.sp
.ne 2
.na
\fB\fIfile\fR\fR
.ad
.sp .6
.RS 4n
Represents a valid file name. \fBdf\fR reports on the file system that contains
\fIfile\fR.
.RE
.sp
.ne 2
.na
\fB\fIresource\fR\fR
.ad
.sp .6
.RS 4n
Represents an \fBNFS\fR resource name.
.RE
.SH USAGE
.LP
See \fBlargefile\fR(5) for the description of the behavior of \fBdf\fR when
encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH EXAMPLES
.LP
\fBExample 1 \fRExecuting the \fBdf\fR command
.sp
.LP
The following example shows the \fBdf\fR command and its output:
.sp
.in +2
.nf
example% \fB/usr/bin/df\fR
/ (/dev/dsk/c0t0d0s0 ): 287530 blocks 92028 files
/system/contract (ctfs ): 0 blocks 2147483572 files
/system/object (objfs ): 0 blocks 2147483511 files
/usr (/dev/dsk/c0t0d0s6 ): 1020214 blocks 268550 files
/proc (/proc ): 0 blocks 878 files
/dev/fd (fd ): 0 blocks 0 files
/etc/mnttab (mnttab ): 0 blocks 0 files
/var/run (swap ): 396016 blocks 9375 files
/tmp (swap ): 396016 blocks 9375 files
/opt (/dev/dsk/c0t0d0s5 ): 381552 blocks 96649 files
/export/home (/dev/dsk/c0t0d0s7 ): 434364 blocks 108220 files
.fi
.in -2
.sp
.sp
.LP
where the columns represent the mount point, device (or "filesystem", according
to \fBdf\fR \fB-k\fR), free blocks, and free files, respectively. For contract
file systems, \fB/system/contract\fR is the mount point, \fBctfs\fR is the
contract file system (used by \fBSMF\fR) with 0 free blocks and
2147483582(\fBINTMAX\fR-1) free files. For object file systems,
\fB/system/object\fR is the mount point, \fBobjfs\fR is the object file system
(see \fBobjfs\fR(7FS)) with 0 free blocks and 2147483511 free files.
.LP
\fBExample 2 \fRWriting Portable Information About the \fB/usr\fR File System
.sp
.LP
The following example writes portable information about the \fB/usr\fR file
system:
.sp
.in +2
.nf
example% \fB/usr/bin/df -P /usr\fR
.fi
.in -2
.sp
.LP
\fBExample 3 \fRWriting Portable Information About the \fB/usr/src\fR file
System
.sp
.LP
Assuming that \fB/usr/src\fR is part of the \fB/usr\fR file system, the
following example writes portable information :
.sp
.in +2
.nf
example% \fB/usr/bin/df -P /usr/src\fR
.fi
.in -2
.sp
.LP
\fBExample 4 \fRUsing \fBdf\fR to Display Inode Usage
.sp
.LP
The following example displays inode usage on all \fBufs\fR file systems:
.sp
.in +2
.nf
example%\fB/usr/bin/df -F ufs -o i\fR
.fi
.in -2
.sp
.SH ENVIRONMENT VARIABLES
.LP
See \fBenviron\fR(5) for descriptions of the following environment variables
that affect the execution of \fBdf\fR: \fBLANG\fR, \fBLC_ALL\fR,
\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.sp .6
.RS 4n
An error occurred.
.RE
.SH FILES
.ne 2
.na
\fB\fB/dev/dsk/*\fR\fR
.ad
.sp .6
.RS 4n
Disk devices
.RE
.sp
.ne 2
.na
\fB\fB/etc/default/fs\fR\fR
.ad
.sp .6
.RS 4n
Default local file system type. Default values can be set for the following
flags in \fB/etc/default/fs\fR. For example: \fBLOCAL=ufs\fR, where \fBLOCAL\fR
is the default partition for a command if no FSType is specified.
.RE
.sp
.ne 2
.na
\fB\fB/etc/mnttab\fR\fR
.ad
.sp .6
.RS 4n
Mount table
.RE
.sp
.ne 2
.na
\fB\fB/etc/vfstab\fR\fR
.ad
.sp .6
.RS 4n
List of default parameters for each file system
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Standard
.TE
.SH SEE ALSO
.LP
\fBfind\fR(1), \fBdf_ufs\fR(1M), \fBmount\fR(1M), \fBstatvfs\fR(2),
\fBdefault_fs\fR(4), \fBmnttab\fR(4), \fBvfstab\fR(4), \fBattributes\fR(5),
\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5), \fBobjfs\fR(7FS)
.SH NOTES
.LP
If \fBUFS\fR logging is enabled on a file system, the disk space used for the
log is reflected in the \fBdf\fR report. The log is allocated from free blocks
on the file system, and it is sized approximately \fB1\fR Mbyte per \fB1\fR
Gbyte of file system, up to 256 Mbytes. The log size may be larger (up to a
maximum of 512 Mbytes) depending on the number of cylinder groups present in
the file system.
|