Jeff,
thx for the reply. Unfortunately I have not used scripts and crontab so far. If
you can give additional help I would truly appreciate it.
most of my space seems to have been taken by the antivirus and cache
/var/amavis /var/log/cache
thankx for all the help
Mircea Draghici
----- Original Message ----
From: Jeff Price <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, March 27, 2007 8:19:35 AM
Subject: Re: [Efw-user] disk usage
Mircea Draghici wrote:
> Hello everybody,
>
> I have recently noticed that our EFW box has started to run out of
> space. It seems that there are a lof of files left in the quarantine
> folders. The logs have also increased quite a bit. I managed to
> successfully delete some of the files and create some free space but I
> am thinking that there should be some automation in place that could
> check the free space periodically and make room if certain conditions
> are met.
>
> My question is: does anybody know of an easy way to clean the old
> entries. Do you have some script that could be run periodically once a
> certain threshold has been reached (ie. clean files older than 30 days
> if free space is less than 1GB)
Mircea;
I will assume that you are used to writing scripts and using crontab; if
not let me know and I'll help you write a script.
Write a script that uses df -h to return the free space on the hard
drive, test the value to see if you have met the threshold of less than
1 Gb of free space; if it has run the sub routine below,
find /directory/where/your/files/are -type f -mtime +30 -exec rm '{}' \;
if it is still within the threshold value use the script to exit because
it has nothing to do.
run this as a crontab once a day at a time period where the load is
typically the lowest. This script if written properly uses very few
system resources.
Hope this helps
Jeff Price
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Efw-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/efw-user
____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel
bargains.
http://farechase.yahoo.com/promo-generic-14795097-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Efw-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/efw-user