[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Limits of grep?
On Tue, Sep 26, 2000, To Shachar Shemesh wrote about "Re: Limits of grep?":
> On Tue, Sep 26, 2000, Shachar Shemesh wrote about "Re: Limits of grep?":
> command line. This kernel call has a limit - I don't know what it is in Linux,
> but from a little experiment I guess it is 128 kilobytes. If the command line
>...
I feel funny responding to my own message, but here it goes :)
I checked, and the limit in Linux is indeed 128K (at least, in the stock
2.2.14 kernel included in Redhat 6.2):
In /usr/src/linux-2.2.14/include/linux/limits.h you'll find
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
By the way, it brings up another point I forgot to mention: the limit on
the command line includes the size of the environment (i.e., a string
containing all the exported shell variables), because this environment string
is also passed to the called program using execve (aain, see 'man execve'
for more information).
--
Nadav Har'El | Tuesday, Sep 26 2000, 26 Elul 5760
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |In Fortran, God is real unless declared
http://nadav.harel.org.il |an integer.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il