Hi, Is there any chance to automatic clear tmp folder in each apache virtual host? I have tons of session files there.. And doing it manually for each host takes ages. Regards, Michael
You could use the following command (but be very careful and use it on your own risk!) Code: cd /var/www find . -name "sess_*" -type f | grep '/tmp/' | xargs rm
Well, basicly I have terrible aplication hosted on my server, and it doesn't remove session files. After one week I have over 400.000 od sess_* files for one site only! So I have to found soultion for this Regards, Michael
But keep in Mind that if you delete a session file the session is destroyed even if the user is still using it.
So I had a deeper look into this. Maybe this helps: Code: find /var/www -path "*/tmp/*" -name "sess_*" -type f -cmin +90 -print0 | xargs -n 200 -r -0 rm this deletes all session files older than 90 minutes.