From owner-freebsd-hackers Tue Jan 8 13:35:39 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id DD24337B405 for ; Tue, 8 Jan 2002 13:35:32 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id g08LZS535296; Tue, 8 Jan 2002 16:35:29 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Tue, 8 Jan 2002 16:35:27 -0500 To: David Miller From: Garance A Drosihn Subject: Re: Overriding ARG_MAX Cc: freebsd-hackers@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.1 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 At 10:54 PM -0500 1/4/02, David Miller wrote: >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:) While "greatly expanding" ARG_MAX might do what you want, it is a bad idea as there are a number of side-effects to doing that. You are not "just fixing" your problem, you are greatly increasing the memory usage of many things in the system -- some of which are going to assume the official POSIX setting for ARG_MAX (intentionally or unintentionally) no matter what you change it to. That is a mighty big hammer to swing to fix the problem you're talking about, and it's a hammer that you're going to have to keep "expanding" as you get more files to process. I doubt you'll be thrilled with this answer, as I am also going to ignore your direct question to answer what *I* consider to be "the bigger" question, but I would do this some other way. If it were me, I would write a script in perl or ruby which would do the operations I feel I need to do on these directories of files. Maybe I'd even generalize it, so I could feed it "normal-looking" commands, and the script would know how to break up the list of files to get the right results -- without going over ARG_MAX. This way you don't have to care about changing the size of ARG_MAX. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message