Argument list too long

Warning: Be careful when deleting large swaths of files, because the slightest mistake can have disastrous consequences--it's very difficult if not impossible to get those files back once they are deleted!


If you are using a command like rm on a folder with a lot of arguments, you might end up with an error similar to:

/bin/rm: Argument list too long.

You can still delete the files in question, however:

find PATH -name 'ARG' -print0 | xargs -0 rm

Where FILEPATTERN stands for the filename pattern you tried to use (including wildcards) with the rm command and PATH is the path to the files, such as in the command:

rm PATH/FILEPATTERN

[edit] References

XHTML 1.1 CSS 2 Sec 508