Here's (what I hope is) a small optimisation to Bob's solution.
* fuser returns non-zero if the files aren't in use
* since we only need the argument once, we probably don't need a shell
Can you guys check this over for me?
find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f \
-cmin +$(/usr/lib/php5/maxlifetime) \
! -execdir fuser -s {} \; \
-delete
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

