Development, IT Linux “Argument list too long”: Beyond Arguments and Limitations

Are you trying to delete a very large number of files at one time, you will probably run into this error:
/bin/rm: Argument list too long.

"Argument list too long": Beyond Arguments and Limitations
Deleting large number of files on Linux

To Solve this using a faster way of deleting files – the “find” command has a “-delete” flag built right in! use this:
find . -type f -delete

or this to show the filenames as you’re deleting them:
find . -type d -print -delete

Sign up for our newsletter to stay up to
date with tech news!