Search This Blog

Tuesday 12 January 2010

Checking file system capacity

This simple script is desinged to check the filysystem capacity.
This path to this script cab be included in user profile so that it can give a message to user when he loges in
=======================================
LIMIT=90 #->here it gives message if its more than 90% full
FS=apps #-> mount point to check
CAP=`df -h /$FS|grep $FS |awk {'print $5'}|cut -d\% -f1`
if [ $CAP -gt $LIMIT ]
then
echo "Dear user, please clean /$FS since it is $CAP% full"
fi
======================================

1 comment:

  1. Good script ...But u need a while load to read the CAP

    ReplyDelete