long arguments

we get a lot of spam at work, and it tends to fill up the mqueue folder on the spam assassin server with bogus returns, to the point where i have to go in and rm a bunch of the older messages to get the server to calm down. spam ninja but rm can only handle a certain number of files (i’ve read this is a kernel limitation), so here is my workaround to nuke a large number of files (including word counts):

[root@assassin mqueue]# rm -Rf
-bash: /bin/rm: Argument list too long

[root@assassin mqueue]# ls -al | wc -l
38794

[root@assassin mqueue]# find . | xargs rm
rm: cannot remove `.’ or `..’

[root@assassin mqueue]# ls -al | wc -l
35

the important bit in all of that is of course: find . | xargs rm