Asked • 05/06/19

Argument list too long error for rm, cp, mv commands?

I have several hundred PDFs under a directory in UNIX. The names of the PDFs are really long (approx. 60 chars). When I try to delete all PDFs together using the following command: rm -f *.pdf I get the following error: /bin/rm: cannot execute [Argument list too long] What is the solution to this error? Does this error occur for `mv` and `cp` commands as well? If yes, how to solve for these commands?

2 Answers By Expert Tutors

By:

Meiy P. answered • 03/11/20

Tutor
New to Wyzant

Effective Math, Physics, Excel & vba Macros Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.