bash: Argument list too long
Submitted by infojunkie on Wed, 2006-07-12 18:52.
in
Let's say you want to
rename 's/MS Press/Microsoft Press/' *
but you get the error:
bash: /usr/bin/rename: Argument list too long
This error occurs when you attempt to perform an operation that invokes bash's file listing in a folder that contains a large number of files. The solution is to let someone else list those files for you:
find . -name '*' -print0 | xargs -0 rename 's/MS Press/Microsoft Press/'