/bin/rm: cannot execute [Argument list too long]
The reason this occurs is because bash actually expands the asterisk to every matching file, producing a very long command line. Try this: find . -name “*.pdf” -print0 | xargs -0 rm Warning: this is a recursive search and will find (and delete) files in subdirectories as well. Tack on -f to the rm command … Read more