David C. Rankin wrote:
Listmates,
I was trying to use chmod, but it says:
12:44 nirvana/srv/www/download> find . -type f -print0 | xargs -0 sudo chmod 0644 sudo: unable to execute /bin/chmod: Argument list too long
How long is too long? How many files will chmod do, or does it depend on the length of file names?
Your problem is sudo, not chmod. (And the other posters who recommeded to use xargs might want to read your post again.) sudo's notion of allowed argument list length differs from xargs. xarg's notion is probably right for Linux, and sudo's notion is safe for a wide variety of Unix systems. Try find . -type f -print0 | sudo xargs -0 chmod 0644 that should do the trick. This way sudo gets only 4 arguments, and not thousands. Semantically, it's the same. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org