Command to delete the session files from the tmp.

Basically all the session files stored in the tmp directory and some time due to the excessive connection to mysql, we are facing the tmp directory 100% full problem at that time we can use the following command in cron and remove the session file more then 30 minutes old.

find /tmp -type f -name sess_* -cmin +30 |xargs rm -f


In above command I have used +30 for the 30 minutes, you can use the values as per your requirement.

About Anant 384 Articles
Senior technical writer