[Logwatch-Devel] zz-disk_space suggestion

DJ Delorie dj at delorie.com
Thu Mar 10 08:13:51 MST 2005

Just a suggestion...  I know the latest has *a* solution to the long
device name problem, but the ugly unaligned columns that -P produces
are IMHO unacceptable.  My script (FC3, logwatch-5.2.2) uses this
command now:

df -P -h \
| grep '^/dev/' \
| awk '{printf("%6s %6s %6s %4s  %s\n", $2, $3, $4, $5, $6);}' \
| sort -b +4

(Yes, I know the device is not printed.  I don't need or want it)

Also, since the script is now written in perl, you could in theory use
open(DF, "df -kP |") and parse/format the output in the perl script.

(not subscribed)

More information about the Logwatch-Devel mailing list