Linux deleted too many files: bash:/usr/bin/rm: Argument list too long

background

An error was encountered while deleting a file with a specified suffix in a folder. Tips bash:/usr/bin/rm: Argument list too long. Obviously there are too many files with the specified suffix, making it impossible to delete them.

solution

Delete through commands find, such as deleting all json files. You can delete it with the following command

find . -name '*.json' -delete

Guess you like

Origin blog.csdn.net/qq_29007291/article/details/130004673