At work, we hired a consultant to help us with our shopping cart software (because the tmp files were never getting cleaned out). His solution was handing us a shell script that would do it for us. The only problem is that it's not working on Solaris 9. I think Solaris 9 doesn't support the -empty option, but I'm not sure. Could anyone help me fix this script?
rm -rf /usr/serverdirectory/tmp/addr_ctr/*
find /usr/serverdirectory/tmp -type f -mtime +2 |xargs rm -f
find /usr/serverdirectory/tmp -type d -empty -depth -mindepth 1 |xargs rmdir