[alt.sys.sun] Too many words from ``

ken@csis.dit.csiro.au (Ken Yap) (03/04/91)

Anybody seen this problem with csh on SunOS 4.1?

[tucana 462] chmod 644 `find . -type f -print`
Too many words from ``.
^C^\^Z
^C^C^C^C^C

And csh refused to talk to me anymore.  A ps reveals no chmod running,
just csh.

mikel@teda.UUCP (Mikel Lechner) (03/05/91)

ken@csis.dit.csiro.au (Ken Yap) writes:

>Anybody seen this problem with csh on SunOS 4.1?

>[tucana 462] chmod 644 `find . -type f -print`
>Too many words from ``.
>^C^\^Z
>^C^C^C^C^C

>And csh refused to talk to me anymore.  A ps reveals no chmod running,
>just csh.

You apparently blew the C-shell's mind.  The problem is that there is
a limit to the number of "words" you can pass to a command from the
C-shell.  I believe that the limit is around 1024 words.  So evidently
your find producted over 1024 filenames.

A better way to do what you want, (ie one that works), is this command:

	find . -type f -exec chmod 644 {} ';'

However, this will run a bit slower, since it will create a new chmod
process for each file encountered.  But, it will work.


-- 
Mikel Lechner			UUCP:  teda!mikel
Teradyne EDA, Inc.
5155 Old Ironsides Drive	| If you explain so clearly that nobody
Santa Clara, Ca 95054		| can misunderstand, somebody will.