The other day when I use Xenu to check the broken links the /tmp directory was quickly filled up. When I tried to remove the temporary files using “rm *” command I was told “bach:/bin/rm Argument list too long”. Apparently there is a max number of files that rm can handle.
A little bit search on the web yielded this following solution:
use the find command and xargs, the file can be removed one by one. Like this in my case:
find . -name ‘sess_*’ | xargs rm
Since find command can also look for files with certain age, it is a great way to clean up files in this way.