matt@oddjob.UChicago.UUCP (Matt Crawford) (01/22/85)
Here's a script which we run twice a week from crontab. It used to
use du(1) instead of the 4.2 quot(8). No flames about not having
used sh, please -- I wrote this before I knew any better.
#! /bin/csh -f
# Script to notify heavy disk users of their sins
# Change the constant at the beginning of the awk command as needed.
#
/etc/quot -f /dev/rra0f | \
grep -v 'root' | \
awk '$1 > 10000 { printf "mail %s << EOM\n", $3 ;\
printf "Your %d files on /oa are using %d KB.\n",$2,$1;\
printf "This makes you the number %d disk-hog.\n",NR;\
printf "EOM\n" ; }' | \
csh -sf