[TriLUG] Limit to command line arguments?

Rick DeNatale rick.denatale at gmail.com
Sat Oct 22 14:36:40 EDT 2005


On 10/22/05, Warren Myers <volcimaster at gmail.com> wrote:
> Can you do something along the lines of <progname> *.CAD?

I don't think that that will help. Unlike Windows where programs are
expected to expand file wildcards internally, *nix shells do that work
for the program.

The shell expands globs before it calls a command,  so
progname *.CAD

gets expanded to:

progname f1.CAD ...    f300.CAD

which will overflow any command buffer/argument count limit just as if
you'd typed the arguments yourself.

I've seen situations where ls * failed in a directory with a lot of files.

--
Rick DeNatale

Visit the Project Mercury Wiki Site
http://www.mercuryspacecraft.com/



More information about the TriLUG mailing list