From owner-freebsd-hackers Fri Jan 4 19:57: 8 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from search.sparks.net (d-207-5-180-136.gwi.net [207.5.180.136]) by hub.freebsd.org (Postfix) with ESMTP id 8BD1637B41F for ; Fri, 4 Jan 2002 19:57:03 -0800 (PST) Received: by search.sparks.net (Postfix, from userid 100) id 26DE0D983; Fri, 4 Jan 2002 22:54:12 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by search.sparks.net (Postfix) with ESMTP id 0EB69D982; Fri, 4 Jan 2002 22:54:12 -0500 (EST) Date: Fri, 4 Jan 2002 22:54:11 -0500 (EST) From: David Miller To: Terry Lambert Cc: freebsd-hackers@freebsd.org Subject: Re: Overriding ARG_MAX In-Reply-To: <3C3677AB.3E9BE6ED@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message