Cron job for monthly top 50 directories by space usage

Below is a little cron item I conjured up today to report the top 50 directories sorted by space.  At some point, I may work on fixing it so it only reports bottom level directories.

du -h /exports/projects/ | sort -h -r | head -n 51 > /tmp/topproject.txt && mail -s "Linux Projects Top 50" < /tmp/topproject.txt
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s