pst@anise.acc.com (Paul Traina) (08/04/89)
Well, I didn't feel like waiting to see if someone would send me a copy of "bdf", so I wrote my own. It's definitely fast enough on my system. It does assume that df outputs numbers in 512 byte blocks. Feel free to use it, give it away, sell it, wipe your ass with it, etc. -- cut here -- /bin/df -t | awk ' BEGIN{ printf("Filesystem Total kbytes kbytes %%\n"); printf("node kbytes used free used Mounted on\n"); } { if ($1 == "total") { totalblocks = $2 ; totalinodes = $4; usedblocks = totalblocks - freeblocks; printf("%-24s %7d %7d %7d %3d%% %s\n", \ fsnode, totalblocks / 2, usedblocks / 2, \ freeblocks / 2, (usedblocks * 100) / totalblocks, \ mountpoint); } else { mountpoint = $1; fsnode = $2 ; freeblocks = $3; freeinodes = $4; } }' -- cut here -- -- "The Constitution isn't all that great, but it sure beats the hell out of what we're using now!" -- stolen from someone who stole it from a clever person in alt.drugs