#39 Analyzing Disk Usage

Even with the advent of very large disks and their continual drop in price, system administrators seem to perpetually be tasked with keeping an eye on disk usage to ensure that the system doesn't fill up.

The most common monitoring technique is to look at the /users or /home directory, using the du command to ascertain the disk usage of all the subdirectories, and then reporting the top five or ten users therein. The problem with this approach, however, is that it doesn't take into account space usage elsewhere on the hard disk(s). If you have some users who have additional archive space on a second drive, or sneaky types who keep MPEGs in a dot directory in /tmp or in an unused and accidentally opened directory ...

Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.