Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to sort out - bash: /bin/rm: Argument list too long
rm * in a directory that contains a lot of individual files might get the following error:
- bash: /bin/rm: Argument list too long
There are a few ways to delete the files inside that specific directory:
- You could delete the whole folder
- You could the
findcommand - this is my personal favorite
- Or use a for loop - much slower!
Here’s how to do that!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×