|[ Team LiB ]|
Finding Disk Information
Use the df and du commands described in the following sections to show disk use information and to tell if a file system is local (UFS) or remote (NFS).
Displaying Used Disk Space in a Human-Readable Format (df -h)
Use the -h option of the df command—new in the Solaris 9 Operating Environment—to display disk information in a format that is easier to read, for example, 14K, 234M, 2.7G, or 3.0T. Scaling is done by repetitively dividing by 1024. The following example shows the disk use for the mopoke system.
mopoke% df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1t0d0s0 9.6G 2.0G 7.6G 21% / /proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab fd 0K 0K 0K 0% /dev/fd swap 533M 40K 533M 1% /var/run swap 534M 344K 533M 1% /tmp /dev/dsk/c1t0d0s7 3.9G 11M 3.9G 1% /export/home /vol/dev/dsk/c1t1d0/sol_9_doc_1of2 356M 356M 0K 100% /cdrom/sol_9_doc_1of2 /export/home/winsor 3.9G 11M 3.9G 1% /home/winsor mopoke%
Displaying Used Disk Space in Kilobytes and Percentage of Capacity (df -k)
Use the -k option of the df command to display disk information in the table format used with SunOS 4.x system software. Type df -k and press Return. The file system, total kilobytes, used kilobytes, available kilobytes, percentage of capacity used, and mount point for local disk partitions are displayed, as shown in the following example.
paperbark% df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 1388215 920657 412030 70% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd mnttab 0 0 0 0% /etc/mnttab swap 529832 0 529832 0% /var/run swap 530136 304 529832 1% /tmp /dev/dsk/c0t0d0s7 112783 25289 76216 25% /export/home /dev/dsk/c0t1d0s7 2012390 9 1952010 1% /export/home0 paperbark%
Determining Whether File Systems Are Local or NFS Mounted (df)
To find out whether file systems are local or NFS mounted, type df filesystem and press Return. Disk formatting information (including disk location or mount point) for the file system you specify is displayed.
In the following example, the file system is NFS mounted.
oak% df /home/ignatz bigriver:/export/home/ignatz 538980 399435 85647 82% /home/ignatz oak%
In the following example, the file system is on a local disk.
# df / /dev/dsk/c0t0d0s0 30383 11885 15468 43% / #
Finding All Mounted File Systems of a Specific Type (df -F)
If you want to display all the mounted file systems of one file system type, use the -F option followed by the file system type. The most common file system types are ufs for local file systems and nfs for network file systems. To find all mounted file systems of a specific type, type df -F filesystem-type and press Return.
In the following example, the mounted NFS file systems are displayed.
cinderella% df -F nfs /net (cinderella:(pid153)): 0 blocks -1 files /usr/dist cinderella:(pid153)): 1276248 blocks -1 files /home (cinderella:(pid153)): 0 blocks -1 files /usr/man (oak:/export/man): 272934 blocks -1 files cinderella%
In the following example, the mounted UFS (local) file systems are displayed.
cinderella% df -F ufs (/dev/dsk/c0t0d0s0): 36992 blocks 13558 files /usr (/dev/dsk/c0t0d0s6): 274346 blocks 94403 files /export/home/cinderella (/dev/dsk/c0t3d0s7): 379670 blocks 96046 files cinderella%
In the following example, information about the mounted temporary file system is displayed.
cinderella% df -F tmpfs /tmp (swap ): 88528 blocks 3156 files cinderella%
NOTE. You cannot use the df command to display SWAPFS file systems because they are never mounted.
|[ Team LiB ]|