give me a 1 line command to tell me how much free space I have on my hard disk using SSH/Bash on a Unix system and If it's lower then 100mb to send me a letter.
system admins: easy 1
Collapse
X
-
system admins: easy 1
Tags: None -
c'mon, its suppose to be easy, the "df" command and the "mail" commandOriginally posted by Zestergive me a 1 line command to tell me how much free space I have on my hard disk using SSH/Bash on a Unix system and If it's lower then 100mb to send me a letter. -
Originally posted by Zestergive me a 1 line command to tell me how much free space I have on my hard disk using SSH/Bash on a Unix system and If it's lower then 100mb to send me a letter.
for which mounted filesystem?Comment
-
df -H
will show you thatSince 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

Totally Free TemplatesComment
-
-
try that....free=`df -k | awk '{sum += $4;}END{print sum}'`; if [ $free -gt "`expr 1024 \* 1024 \* 100`" ]; then echo "Space is dangerously low" | mail -s "System Alert" [email protected]; fi;Comment



Comment