The UNIX environment has two common commands for looking at disk usage - 'df' and 'du'. 'df' returns information about all mounted disks, and 'du' returns information about a given file or set of files. As installed in OS X, though, the 'df' and 'du' commands do not return easy to use information. For example, here's the 'df' output for one drive on my system:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/disk0s9 3121344 1314624 1806720 42% /osxfiles
Wouldn't it be much nicer if you could have it output like this:
Filesystem Size Used Avail Use% Mounted on
/dev/disk0s9 3.0G 1.3G 1.7G 42% /osxfiles
Read the rest of this article if you'd like to learn how to create a more usable "df" (and other!) commands.
I have packaged four of the more useful of these utilities (ls, dircolors (sets the colors for the new ls), df, and du) into one downloadable archive
. These are pre-compiled, and you'll just need to expand the archive with OpenUp or the command line (or the new StuffIt Expander). Move the files into /usr/localbin
, and they should be ready to go. I have NOT included the 'man' pages, since I wasn't sure how to do that - read the GNU online help for info on each command, or compile the whole package.