argument number limit

Vernon Schryver vjs at rhyolite.wpd.sgi.com
Fri Dec 21 06:22:22 AEST 1990


In article <9012182223.AA05751@>, brad at lsr-vax.UUCP (Brad Zoltick - LMO) writes:
> We are running up against the number-of-arguments limit allowed on
> the command line under the C shell.  Is there a way to increase
> this limit to a much larger value. Shell files that run properly under
> SUNOS4 are failing under IRIX-3.31 with the error
> 
> 		"argument number too large".


No matter how large you make the shell and kernel arg limits, someone will
hit them.  For example, if you needed to fiddle with all of the files in a
full netnews spool tree, no plausible limit would work.

Xargs is of the few technical advantages SVR3 had compared to 4.3BSD.  It
solves most such problems.  For example, the following command will
grep all files in the current directory tree:

    find . -type f -print | xargs grep foobaz

The -prune arg to find can also be used.  Sed is also handy in such things:

    find . -type f -print | sed -e '/notthese/d' -e '/orthis/d' | xargs ...


All of this is not to say whether the 3.3.1 csh has a small limit.  We have
radically increased the AT&T SVR3 kernel limit.  I think csh is now pretty
standard 4.3BSD, complete with command completion.  Who knows what Sun has
done?


It should be noted that flat directories of hundreds of files are not
efficient.  Trees are much better for computers as well as people.


Vernon Schryver,   vjs at sgi.com



More information about the Comp.sys.sgi mailing list