Farid Ahmadian / PHP

Cleanup php session files

Public domain


crontab -e

# Cleanup php session files older than 24 minutes
*/5 * * * * root cd /tmp; find -cmin +24  -name "sess_*"  | xargs rm
#*/5 * * * * root find /tmp -cmin +24 -maxdepth 1 -type f -exec rm  {} \;

BY: Pejman Moghadam
TAG: cron, php
DATE: 2012-05-29 23:37:31


Farid Ahmadian / PHP [ TXT ]

With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)