The df tool without any options, prints the usage statistics for all mounted file systems. You can use the –k and –h options for more descriptive output. The –k option changes block units to 1024 bytes (effectively kilobytes) and the –h option generates human readable output as the amount is displayed in kilobytes, megabytes or gigabytes.
# df [-kh] [directory, dataset or device]
The df tool can use a directory, a ZFS dataset or a block device to filter the output. The command then prints out the statistics just for the given file system.
Example 15 Displaying File System Space UsageThis example shows an output of the df tool. The output shows mount points, devices containing the file system, number of free blocks (in units of 512 bytes), and the number of files that can be stored.
# df / (rpool/ROOT/solaris):63807702 blocks 63807702 files /var (rpool/ROOT/solaris/var):63807702 blocks 63807702 files /devices (/devices ): 0 blocks 0 files /dev (/dev ): 0 blocks 0 files /system/contract (ctfs ): 0 blocks 2147483583 files /proc (proc ): 0 blocks 29927 files /etc/mnttab (mnttab ): 0 blocks 0 files /system/volatile (swap ): 4176136 blocks 1130857 files /tmp (swap ): 4176136 blocks 1130857 files /system/object (objfs ): 0 blocks 2147483413 files /etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files /dev/fd (fd ): 0 blocks 0 files /lib/libc.so.1 (/usr/lib/libc/libc_hwcap2.so.1):63807702 blocks 63807702 files /var/share (rpool/VARSHARE ):63807702 blocks 63807702 files /export (rpool/export ):63807702 blocks 63807702 files /export/home (rpool/export/home ):63807702 blocks 63807702 files /export/home/jack (rpool/export/home/jack):63807702 blocks 63807702 files /rpool (rpool ):63807702 blocks 63807702 files /system/zones (rpool/VARSHARE/zones):63807702 blocks 63807702 files /var/share/kvol (rpool/VARSHARE/kvol):63807702 blocks 63807702 files /var/share/sstore/repo(rpool/VARSHARE/sstore):63807702 blocks 63807702 files /var/share/tmp (rpool/VARSHARE/tmp):63807702 blocks 63807702 files /var/share/pkg (rpool/VARSHARE/pkg):63807702 blocks 63807702 files /var/share/pkg/repositories(rpool/VARSHARE/pkg/repositories):63807702 blocks 63807702 files /mnt (/dev/dsk/c2t2d0s0 ):107192852 blocks 8491364 filesExample 16 File System Space Usage in Descriptive Format With Unit Suffixes
This example shows an output of the df command where numbers of blocks are translated. The output also shows the file system usage in percentages.
# df -h Filesystem Size Used Available Capacity Mounted on rpool/ROOT/solaris 67G 3.4G 30G 10% / rpool/ROOT/solaris/var 67G 574M 30G 2% /var /devices 0K 0K 0K 0% /devices /dev 0K 0K 0K 0% /dev ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 2.0G 2.5M 2.0G 1% /system/volatile swap 2.0G 60K 2.0G 1% /tmp objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab fd 0K 0K 0K 0% /dev/fd /usr/lib/libc/libc_hwcap2.so.1 34G 3.4G 30G 10% /lib/libc.so.1 rpool/VARSHARE 67G 77M 30G 1% /var/share rpool/export 67G 36K 30G 1% /export rpool/export/home 67G 33K 30G 1% /export/home rpool/export/home/jack 67G 34K 30G 1% /export/home/jack rpool 67G 3.3M 30G 1% /rpool rpool/VARSHARE/zones 67G 31K 30G 1% /system/zones rpool/VARSHARE/kvol 67G 31K 30G 1% /var/share/kvol rpool/VARSHARE/sstore 67G 279M 30G 1% /var/share/sstore/repo rpool/VARSHARE/tmp 67G 9.5M 30G 1% /var/share/tmp rpool/VARSHARE/pkg 67G 32K 30G 1% /var/share/pkg rpool/VARSHARE/pkg/repositories 67G 31K 30G 1% /var/share/pkg/repositories
For more information, see the df(1M) man page.