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.

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''".

-- Terry

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

Reply via email to