bash: /bin/rm: Argument list too long
December 28th, 2008 | Posted by in ICTToday, I needed to empty a folder on my Linux server that containted a lot of files. The files where maybe 2kb, but all the files together contained over 400Mb.
So I used rm * to remove them, but it threw me a nice error: bash: /bin/rm: Argument list too long . Looks like rm has its limits
Use ‘find’ to pipe all the matching files to ‘rm’, one at a time:
find . -name '*' | xargs rm
And I’m a happy camper again.
You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.


