PDA

View Full Version : Here's a one line bash script to check /var space



cojonesdetoro
01-29-2004, 01:55 PM
[ $(set $( df -vh | grep /var ) ; echo ${5/%%/} ) -gt 80 ] && echo "Warning: disk space on /var over 80%"

The echo could be any command. Probably good to make it a Tivo message or send you an Email. If you're brave, you can have the Tivo start nulling log files.