We put this in our cron job to run once a day and it's working great.
It deletes all files and directories which haven't been modified in 30 days.
We didn't use access time "-atime" to determine which
files to delete because for performance reasons, we disabled atime on the file
system. A disadvantage of this method is that it
doesn't keep cache size under a certain size (htcacheclean does). It does have
the advantage of keeping the cached content fresh,
is much faster, and seems less resource intensive. We found that our cache
size is pretty stable at about 2 to 4 GB (we average 8MM
hits/month) so we like this better.
root /usr/bin/find /var/httpd/proxy/* -type f -mtime +30 -exec rm -rf {} \;
Remember to change the "/var/httpd/proxy/*" directory to point to wherever your
cache is.
Happy Web Serving,
Geoff Millikan
http://www.t1shopper.com/
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]