#!/bin/sh # Script to identify the resource stealers on your box # admin@wickedmind.com # 06-01-99 # Feel free to change the directory to whatever you want, I usually do /home /var/mail echo " " echo "Getting a list of diskhogs on the system..." echo " " echo "Here they are:" echo " " echo "Home Directories:" echo "-----------------" cd /home; du -sk * | sort -nr | head -20 > /tmp/diskhog cat /tmp/diskhog mail -s "Disk Hogs on wickedmind.com" < /tmp/diskhog root@wickedmind.com echo " " echo "Mail Directories:" echo "-----------------" cd /var/spool/mail; du -sk * | sort -nr | head -20 > /tmp/mailhog cat /tmp/mailhog mail -s "Mail Hogs on wickedmind.com" < /tmp/mailhog root@wickedmind.com rm /tmp/diskhog rm /tmp/mailhog exit 0;