Could ARG_MAX be increased?
Giorgos Keramidas
keramida at ceid.upatras.gr
Thu Sep 23 11:47:24 PDT 2004
On 2004-09-23 14:28, Garance A Drosihn <drosih at 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
More information about the freebsd-current
mailing list