Deal with /bin/rm: Argument list too long
December 3, 2008
As a linux user or administrator, you will someday will need to delete files that pile up your storage. If there are a lot of files (I dont know exactly how much), it will report :
/bin/rm: Argument list too long
Here’s how to handle it :
find . -name ‘[FILE-PREFIX]*’ | xargs rm
For example you want to delete cache_* files, the syntax is :
find . -name ‘cache_*’ | xargs rm




January 24, 2009 at 3:23 am
find . -name ‘[FILE-PREFIX]*’ | xargs rm -f
November 11, 2009 at 4:12 pm
this worked perfect. thanks.