#!/bin/bash
#Updated:2008-03-03 PM By:leif(
[email protected])
EMAIL=/usr/local/bin/email
/bin/df -h >/tmp/df.txt
USE=`df -H | grep -o [0-9]*% | grep -o ‘[0-9]/+'`
for i in $USE
do
if (( $i > 95 ))
then
$EAMIL -s “WARNING Low disk space for $i”
[email protected] break
fi
if (( $i > 90 ))
then
$EMAIL -s “Low disk space for $i”
[email protected] fi
done
/bin/rm -f /tmp/df.txt