Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2002 16:35:27 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        David Miller <dmiller@sparks.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Overriding ARG_MAX
Message-ID:  <p05101000b8611296ce57@[128.113.24.47]>
In-Reply-To: <Pine.BSF.4.21.0201042248520.27496-100000@search.sparks.net>
References:  <Pine.BSF.4.21.0201042248520.27496-100000@search.sparks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05101000b8611296ce57>