root@web2:$ rm pe-warn-*.bz2
-bash: /bin/rm: Argument list too long
This peoblem happens when you are trying to delete too many files in a directory at the same time – it seems rm has special limits …
To solve the problem:
Use:
1 | find . -name 'pe-warn-*.bz2' | xargs rm |
or
1 | find . -name "pe-warn-*.bz2" -delete |