*here* is ds, a nice df replacement.
Tim Endres
time at oxtrap.UUCP
Mon Mar 27 02:12:10 AEST 1989
This is a nice replcement for the awfully inadequate
System V implementation of df.
#!/bin/sh
#
# This script filters the miserable output of "df -t"
# through an awk script which amkes it more meaningful.
#
df -t |
awk 'BEGIN {\
printf "%-20s %-20s %-8s %5s %-5s\n",\
"Mount Point", "Device", "FreeBlks", "Megs", "%Free";\
}\
{\
if ($1 != "total") {\
mntpt = $1;\
device = $2;\
freeblks = $3;\
}\
else {\
printf "%-20s %-20s %8d %5.1f %5.1f%%\n",\
mntpt, device, freeblks, freeblks/2000.0, (freeblks/$2)*100.0;\
}\
}'
More information about the Comp.unix.aux
mailing list