-bash: /bin/rm: Argument list too long

Cannot do mass delete ?
Cannot remove spam files ?

If you have too many files and with long file name. It is enable to delete using
rm -rf
rm *.xx

Here is the solution for the mass delete.

find . -name 'spam-file-*' | xargs rm

find . -name '*' | xargs rm

Because using find, it do find one by one and it is not put all the file together make the argument too long.

Justin Soo is a self-employed Web Development Consultant Specializing, Social Media Content Strategist, Professional Blogger and Computer Engineer. He previous experience in Web Development, Programming, Linux System, MySQL Database. G+ F T In

Tagged with: , , , ,