New and improved 'df' command

griffman

Registered
Last night, as my first-ever attempt at compiling anything on OS X, I downloaded and compiled the "fileutils" package from GNU's website.

The main reason I did this was to get a better 'df' command, which shows disk usage from the command line. The PB doesn't support the '-h' flag, which makes the output of 'df' very readable. GNU's version has this support. Here's a comparison of the two versions...
Code:
[b]NORMAL OS X:[/b]<br>Filesystem           1k-blocks      Used Available Use% Mounted on<br>/dev/disk0s9           3121344   1314624   1806720  42% /osxfiles

[b]DF -H OUTPUT:[/b]<br>Filesystem            Size  Used Avail Use% Mounted on<br>/dev/disk0s9          3.0G  1.3G  1.7G  42% /osxfiles
After downloading and following the instructions, I was amazed when everything actually compiled as expected! :)

If you'd like the new 'df' (along with 'du', and 'ls' and 'dircolors'), you can find them in a compressed package on my ftp site:

ftp://www.macosxhints.com/fileutils.tar.gz

Just download, expand with the command line or OpenUp, move the programs where you want them to live, make an alias to them, and start using them. For full instructions on each program, check GNU's help page for the fileutils program:

http://www.gnu.org/manual/fileutils/index.html

NOTE: I am far far far from a UNIX wizard! This was my first attempt at compiling anything. Use these files at your own risk (although my machine seems to be behaving just fine with them).

If you'd like the whole package (there are about 15 different utilities in the pack), you'll need to download and compile it from GNU's website (http://www.gnu.org).

-rob.
 
Top