|
|
When attempting to achieve optimal performance for the I/O subsystem, it is important to make sure that the disks have enough free space to do their job efficiently. The df(C) command, and its close relative dfspace(C), enable you to see how much free space there is. The following example shows the output from df and dfspace on the same system:
$The -i option to df also provides additional information about the number of free and used inodes.df
/ (/dev/root ): 37872 blocks 46812 i-nodes /u (/dev/u ): 270814 blocks 36874 i-nodes /public (/dev/public ): 191388 blocks 55006 i-nodes /london (wansvr:/london ): 149750 blocks 0 i-nodes $dfspace
/ : Disk space: 18.49 MB of 292.96 MB available ( 6.31%). /u : Disk space: 132.23 MB of 629.98 MB available (20.99%). /public : Disk space: 93.45 MB of 305.77 MB available (30.56%). /london : Disk space: 73.12 MB of 202.56 MB available (36.10%).Total Disk Space: 317.29 MB of 1431.29 MB available (22.17%). $
df -v
Mount Dir Filesystem blocks used free %used / /dev/root 600000 562128 37872 93% /u /dev/u 1290218 1019404 270814 79% /public /dev/public 626218 434830 191388 69% /london wansvr:/london 414858 265108 149750 63%
dfspace is a shell script interface to df. Without options, it presents the filesystem data in a more readable format than df. When used with its options, df provides more comprehensive information than dfspace.
In the above example, there are three local filesystems:
du(C) is another command that can be used to investigate disk usage. It differs from df and dfspace because it reports the number of 512-byte blocks that files and directories contain rather than the contents of an entire filesystem. If no path is specified, du reports recursively on files and directories in and below the current directory. Its use is usually confined to sizing file and directory contents.