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

2 Responses to “Deal with /bin/rm: Argument list too long”

  1. test Says:

    find . -name ‘[FILE-PREFIX]*’ | xargs rm -f

  2. Praz Says:

    this worked perfect. thanks.


Leave a Reply