[Next] [Previous] [Up] [Top] [Contents]

5.3 Disk Check Commands

5.3.3 Disk space commands

df reports the free disk space or inodes on file systems, e.g. to report the disk space:

# df /dev/sd0h
Filesystem kbytes used avail capacity Mounted on
/dev/sd0h 303338 263320 9684 96% /home

and to report the inodes, e.g.:

# df -i /dev/sd0h
Filesystem iused ifree %iused Mounted on
/dev/sd0h 11922 33134 26% /home

du reports the number of disk blocks used by directory or file, e.g.:

# du src (-s Þ sum of disk blocks)
40 src/ntp/hp
418 src/ntp
66 src/traceroute/bin
66 src/traceroute/vj_traceroute
411 src/traceroute
830 src

In SunOS 5.X the commands df and du report in different formats. du uses 512-byte blocks by default, though the -k option will report in kilo-bytes. The -k option to df will report disk information in a format similar to that of SunOS 4.X, and the -l option specifies only local disks, e.g.:

# df -lk
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 17295 12156 3419 78% /
/dev/dsk/c0t3d0s6 134823 109088 12255 90% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
swap 22716 8 22708 0% /tmp
/dev/dsk/c0t3d0s7 41807 15381 22246 41% /home
/dev/dsk/c0t3d0s5 163311 75036 71945 51% /opt


Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]