Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2004 21:46:48 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Putinas Piliponis <Putinas.Piliponis@hansa.lt>
Subject:   Re: Could ARG_MAX be increased?
Message-ID:  <20040923184648.GB775@gothmog.gr>
In-Reply-To: <p06110411bd78c249333c@[128.113.24.47]>
References:  <217202CB5FF8AE439E263CE3D48ECB50686C37@honda.int.hansa.lt> <p06110411bd78c249333c@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-09-23 14:28, Garance A Drosihn <drosih@rpi.edu> wrote:
> I have hit the limits in Solaris, for instance, and one of the earlier
> messages claimed that Sun uses a value of 1meg for MAX_ARGS.

Actually, on a Solaris8 12/02 installation I have access to it's more
like 256 Kb.  At least this is what a configure.sh script generated by
autoconf-2.59 detects when it prints:

    checking the maximum length of command line arguments... 262144

> I have nothing against the idea of increasing the value of MAX_ARGS,
> as long as people realize that increasing it will not solve the issue
> for all situations.

Yeah.  I think the real answer is to learn about find as you and others
have suggested.  The killer feature that convinced me to learn about
find a few years ago was one of sh(1) though.  The ability to pipe the
output of find (or any other command, for that matter) to a custom sh
loop using something like:

	find . -type f | \
	while read line ;do
		# Do something with $line
	done

This and xargs -0 for the cases where filenames can contain whitespace
works like a charm anywhere, anytime...

- Giorgos



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