On Fri, 4 Jan 2002, Terry Lambert wrote:

> David Miller wrote:
> > Apologies if this belongs on -questions.  I couldn't find what I needed in
> > the archives or handbook.
> > 
> > I have a system where I need/want to handle lots of files in a single
> > directory.  Lots as in 100-200K files.  ls | wc -l breaks because the
> > value of ARG_MAX in sys/syslimits.h is too small.  If I change it from
> > 65536 to 4meg and rebuild the world it works fine.
> 
> I don't believe you.  There is no ARG_MAX limit on pipes.

My apologies.  Leo also noted that.

I was trying to give a quick example to a general problem and I got a
little too quick.

What I usually want to do is something more like ls *.out |wc -l, or 
grep something *.data or cat *.foo | grep something.

I have rebuilt the system in the past after greatly expanding ARG_MAX, and
that does what I want.  I'm just looking for an easy way to preserve it
across cvsups, not looking for alternate ways to list the files in a
directory:)

 
> Probably, you are doing something whic you aren't telling us,
> like saying "ls *.c | wc -l" or otherwise using globbing that
> the shell expands to too large a list.
> 
> The easy answer is "use ``find'' instead of ``ls''".

Indeed, but it doesn't answer the basic questions, which was: Is there any
easy way to override ARG_MAX (or arbitrary other paramaters) in make.conf
or a config file, or something else altogether?

--- David



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to