bin/cron_check_diskfree.sh
HDD_FREE=`df -hm /mnt/target | awk '/\//{print $4}'`
if [ $HDD_FREE -lt 1000 ];then
echo disk free space is too small: $HDD_FREE \
| mail -s "hdd space warning" mymobile@domain.com -- -f nagios@`hostname`
fi
fcrontab -e
cron登録
9 0 * * * $HOME/bin/cron_check_diskfree.sh