Re: email notification when HDD fills up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We use this in a script. YMMV:
 
touch /tmp/mail.txt
USEPERCENT=`df / | egrep / | gawk '{print $5}' | sed s/%//`
echo "${USEPERCENT}"
if [ ${USEPERCENT} > 75 ]
then
mail you@xxxxxxxxxxxxxx -s "Warning, / is at ${USEPERCENT}" < /tmp/mail.txt
rm /tmp/mail.txt
fi
Rob
----- Original Message -----
Sent: Friday, January 23, 2004 12:32 PM
Subject: email notification when HDD fills up

Hi guys,
 
Another question now. If the hard drive fills up, is there any way that when you have only a certain amount of space free, to make the system send to you a notification email ?
 
Genti

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux