From: Radhika Sambamurti (radhika_narendran@yahoo.com)
Date: Tue Apr 30 2002 - 12:09:57 EDT
hi,
I am trying to write a script that checks for diskspace in
/var and if greater than 90% moves certain old files. My
problem seems to be the while loop i am using.
here is my script:
var_space=`df -k| awk `/var/ {print $5}` |awk -F% `{print
$1}``
MAXSIZE=89
MTIME=5
while [ $var_space -gt $MAXSIZE ]
do
find /var/tmp -name \*.inc -mtime +$MTIME -exec ls {}
args -i mv {} /u02/tmp/
var_space=` ` #checking var again
if /var > 90 then make $MTIME = MTIME -1
done
how can i include the part where I can change the variable
MTIME to reduce every time it checks for diskspace, and
/var has not reduced in size?
any help will be apprecited. please disregard the previous
message. my mail went a bit crazy and i sent it by mistake.
thanks,
radhika
=====
It's all a matter of perspective. You can choose your view by choosing where to stand.
--Larry Wall
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:16 EDT