From owner-freebsd-hackers Fri Jan 4 19:49:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id 98E6837B41E for ; Fri, 4 Jan 2002 19:49:07 -0800 (PST) Received: from pool0341.cvx40-bradley.dialup.earthlink.net ([216.244.43.86] helo=mindspring.com) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16MhpM-0006z2-00; Fri, 04 Jan 2002 19:49:00 -0800 Message-ID: <3C3677AB.3E9BE6ED@mindspring.com> Date: Fri, 04 Jan 2002 19:48:59 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: David Miller Cc: freebsd-hackers@freebsd.org Subject: Re: Overriding ARG_MAX References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message