OpenWindows Advanced User's Guide

5.3.2 Displaying Directory Usage (du)

You can use du to display the usage of a directory and all its subdirectories in 512-byte blocks; that is, units of 512 bytes or characters.

du shows you the disk usage in each subdirectory. To get a list of subdirectories in a filesystem, cd to the pathname associated with that filesystem, and run the following pipeline:

$ du | sort -r -n

This pipeline, which uses the reverse and numeric options of the sort command, pinpoints large directories. Use ls -l to examine the size (in bytes) and modification times of files within each directory. Old files, or text files over 100 Kbytes, often warrant storage offline.