email notification when HDD fills up

Charles Howse chowse at charter.net
Fri Jan 23 18:44:57 UTC 2004


On Fri, 2004-01-23 at 12:32, Genti A. Hila wrote:
> 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

That shouldn't be hard to do with a little bash script...

#!/bin/bash
if `df -h | grep 100%` ; then
mail -s "Full Disk" root

This is only an example of the theory, you take it from here.  :-)
-- 
Charles Howse
Jackson, TN
Uptime: 19:53





More information about the fedora-list mailing list