Artificial intelligent assistant

Optimise a shell script / command to delete files I'm running Magento and it doesn't clean up old session data, so I need to clean it up with a shell script / cronjob: 0,30 * * * * /usr/bin/find /var/www/magento/var/session -name 'sess_*' -type f -mtime +1 -exec rm {} \; But that script takes usually some minutes to delete the old files. I'm wondering whether I need to search for the files since in this directory are only files that start with "sess_" - but I still need to traverse those files somehow, right? (around 50.000 files per day are created in this directory)

Don't bother exec'ing `rm` at all, find can handle it:

`0,30 * * * * /usr/bin/find /var/www/magento/var/session -name 'sess_*' -type f -mtime +1 -delete`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b75b6f0e9f64d2795ace9a519bb70c99