how to check my hard disk is below 10%, and then send mail to superuser

how to write bash to superuser, when the disk space dips below 10% of the total by automatically sending an email?
It is have any sample for reference

Something along those lines...... just add a bit of thought and your there :slight_smile:

DFR=`df yourfilesystem |grep -v Filesystem |awk '{print $4}'`
if [ $DFR > "90% ]
then
....
else
...
fi

that should do what you want..... cron it...

#!/usr/bin/bash
DISKUSE=`df -k | awk '{print $5}'`
TEST=`echo $DISKUSE | grep 9[0-9]`
if [ "$TEST" == "" ]
then
exit 0
else
echo "I don't know the mail syntax"
fi
#end

greetings Pre�y