Apr 13 2012
Linux

Delete files – argument list is to long

Posted by Gerrit Schimpf in Linux

If you have problems to delete many files in a folder using rm * because you get the error that the argument list is to long you can use the combination of ls and xargs to get rid of the files.

Instead of

rm *

Solution:

ls | xargs rm -f