Solaris 11 – How to display Information About Files and Disk Space
How to Display Information About Files and Disk Space
Display information about how disk space is used by using the df command.
$ df [directory] [-h] [-t]
- df With no options, lists all mounted file systems and their device names, the number of 512-byte blocks used, and the number of files.
- directory Specifies the directory whose file system you want to check.
- -h Displays disk space in the power of 1024 scaling.
- -t Displays the total blocks as well as the blocks used for all mounted file systems.
Example 1 Displaying Information About File Size and Disk Space
In the following example, all the file systems listed are locally mounted except for /usr/dist.
$ df / (rpool/ROOT/solaris):100709074 blocks 100709074 files /devices (/devices ): 0 blocks 0 files /dev (/dev ): 0 blocks 0 files /system/contract (ctfs ): 0 blocks 2147483601 files /proc (proc ): 0 blocks 29946 files /etc/mnttab (mnttab ): 0 blocks 0 files /system/volatile (swap ):42191440 blocks 2276112 files /system/object (objfs ): 0 blocks 2147483441 files /etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files /dev/fd (fd ): 0 blocks 0 files /tmp (swap ):42191440 blocks 2276112 files /export (rpool/export ):100709074 blocks 100709074 files /export/home (rpool/export/home ):100709074 blocks 100709074 files /export/home/admin (rpool/export/home/admin):100709074 blocks 100709074 files /rpool (rpool ):100709074 blocks 100709074 files /home/joey (home.domain:/export/home1/03/joey):960033722 blocks 67158851 files
Example 2 Displaying File Size Information in 1024 Bytes
In the following example, file system information is displayed in 1024 bytes on one line of information for each specified file system
$ df -h Filesystem Size Used Available Capacity Mounted on rpool/ROOT/solaris 67G 2.7G 48G 6% / /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 20G 704K 20G 1% /system/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab fd 0K 0K 0K 0% /dev/fd swap 20G 0K 20G 0% /tmp rpool/export 67G 32K 48G 1% /export rpool/export/home 67G 32K 48G 1% /export/home rpool/export/home/admin 67G 33K 48G 1% /export/home/admin rpool 67G 74K 48G 1% /rpool home.domain:/export/home1/03/joey 539G 81G 452G 16% /home/joey
Example 3 Displaying Total Number of Blocks and Files Allocated for a File System
The following example shows a list of all mounted file systems, device names, total 512-byte blocks used, and the number of files. The second line of each two-line entry displays the total number of blocks and files that are allocated for the file system.
$ df -t / (rpool/ROOT/solaris): 100709077 blocks 100709077 files total: 140378112 blocks 100838460 files /devices (/devices ): 0 blocks 0 files total: 0 blocks 456 files /dev (/dev ): 0 blocks 0 files total: 0 blocks 681 files /system/contract (ctfs ): 0 blocks 2147483601 files total: 0 blocks 46 files /proc (proc ): 0 blocks 29946 files total: 0 blocks 30002 files /etc/mnttab (mnttab ): 0 blocks 0 files total: 0 blocks 1 files /system/volatile (swap ): 42190928 blocks 2276112 files total: 42192336 blocks 2276330 files /system/object (objfs ): 0 blocks 2147483441 files total: 0 blocks 206 files /etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files total: 0 blocks 1 files /dev/fd (fd ): 0 blocks 0 files total: 0 blocks 31 files /tmp (swap ): 42190928 blocks 2276112 files total: 42190928 blocks 2276330 files /export (rpool/export ): 100709077 blocks 100709077 files total: 140378112 blocks 100709085 files /export/home (rpool/export/home ): 100709077 blocks 100709077 files total: 140378112 blocks 100709085 files /export/home/admin (rpool/export/home/admin): 100709077 blocks 100709077 files total: 140378112 blocks 100709086 files /rpool (rpool ): 100709077 blocks 100709077 files total: 140378112 blocks 100709090 files /home/joey (home.domain:/export/home1/03/joey): 960033724 blocks 67158850 files total: 1129776786 blocks 67966080 files