[ic] Purging session/ and tmp/ - expireall, or rm?
DB at M-and-D.com
Fri Nov 21 07:51:36 EST 2003
> I use a very simple little script I call clean_session_tmp to do it:
> for DIR in $*
> for i in session tmp
> if test -d $DIR/$i
> find $DIR/$i -type f -mmin +480 | xargs --no-run-if-empty rm
> find $DIR/$i -type d -empty -depth -mindepth 1 | xargs --no-run-if-empty rmdir
> echo "$0: $DIR/$i doesn't exist."
> The 480 is 8 hours. You can change the number to what you want.
> It is called in cron:
> 22 4 * * * /usr/local/interchange/bin/clean_session_tmp /home/*/catalogs/*
> Mike Heins
> Perusion -- Expert Interchange Consulting http://www.perusion.com/
> phone +1.765.647.1295 <mike at perusion.com>
Holy crap... I guess I needed that. After running that script my disk
usage went from 45% down to 12%... and I think my drive is 60GB !!!
More information about the interchange-users