DF(8) | Maintenance Commands and Procedures | DF(8) |
df - displays number of free disk blocks and free files
/usr/bin/df [-F FSType] [-abeghklmnPtVvZ]
[-o FSType-specific_options]
[block_device | directory | file | resource ...]
The df 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.
Used without operands or options, df reports on all mounted file systems.
df may not be supported for all FSTypes.
If df 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.
-a
-b
-e
-F FSType
-g
-h
This option overrides the -b, -e, -g, -k, -n, -t, and -V options. This option only works on mounted filesystems and can not be used together with -o option.
-k
-l
-m
-n
-o FSType-specific_options
-t
-V
-Z
-v
The output consists of one line of information for each file system. This one line of information includes the following:
-P
The df utility interprets operands according to the following precedence: block_device, directory, file. The following operands are supported:
block_device
directory
file
resource
See largefile(7) for the description of the behavior of df when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
Example 1 Executing the df command
The following example shows the df command and its output:
example% /usr/bin/df / (/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
where the columns represent the mount point, device (or "filesystem", according to df -k), free blocks, and free files, respectively. For contract file systems, /system/contract is the mount point, ctfs is the contract file system (used by SMF) with 0 free blocks and 2147483582(INTMAX-1) free files. For object file systems, /system/object is the mount point, objfs is the object file system (see objfs(4FS)) with 0 free blocks and 2147483511 free files.
Example 2 Writing Portable Information About the /usr File System
The following example writes portable information about the /usr file system:
example% /usr/bin/df -P /usr
Example 3 Writing Portable Information About the /usr/src file System
Assuming that /usr/src is part of the /usr file system, the following example writes portable information :
example% /usr/bin/df -P /usr/src
Example 4 Using df to Display Inode Usage
The following example displays inode usage on all ufs file systems:
example%/usr/bin/df -F ufs -o i
See environ(7) for descriptions of the following environment variables that affect the execution of df: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.
The following exit values are returned:
0
>0
/dev/dsk/*
/etc/default/fs
/etc/mnttab
/etc/vfstab
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Standard |
find(1), statvfs(2), objfs(4FS), default_fs(5), mnttab(5), vfstab(5), attributes(7), environ(7), largefile(7), standards(7), df_ufs(8), mount(8)
If UFS logging is enabled on a file system, the disk space used for the log is reflected in the df report. The log is allocated from free blocks on the file system, and it is sized approximately 1 Mbyte per 1 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.
April 14, 2016 | OmniOS |