[PLUG] avoiding "Argument list too long" error.
Eric Wilhelm
scratchcomputing at gmail.com
Mon Oct 9 22:42:24 UTC 2006
# from Brent Rieck
# on Monday 09 October 2006 02:50 pm:
>Google tells me that it's actually a kernel issue and to make
>things work as intended I must recompile my kernel.
Yes, it is a kernel issue. And, not just your command-line, but also
your environment variables.
From the kernel source:
$ grep ARG_MAX include/linux/limits.h
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
If you're regularly dealing with 30k files, you should consider doing
something like readdir() in Perl.
If you insist on recompiling your kernel, I would like to see some
benchmarks, because I believe this memory is statically allocated for
each new process :-D If that's the case, it is not so much a
memory-conservation issue as a speed optimization. I, for one, would
rather be able to start many small commands quickly than a few large
ones slowly.
>What year is this again?
$ date +%s -d 'Jan 01, 2006'
1136102400
--Eric
--
"Everything goes wrong all at once."
--Quantized Revision of Murphy's Law
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the PLUG
mailing list