Kevin Old wrote: > On Fri, 2003-10-10 at 11:46, Steve Grazzini wrote: >> On Fri, Oct 10, 2003 at 09:35:25AM -0400, Kevin Old wrote: >> > On Fri, 2003-10-10 at 02:44, Steve Grazzini wrote: >> > > On Thu, Oct 09, 2003 at 12:21:57PM -0400, Kevin Old wrote: >> > > > Are you sure about using ls? We have directory here that has >> > > > several thousand files in it and when doing an ls >> > > > *.whatever-extension we always get an "argument list too long". >> > > > >> > > > Any idea what the actual file limit is for grep? >> > > >> > > It's a system limit (not specific to grep) based on the size-in-bytes >> > > of the argument list (not the number of items). >> > >> > So it's related to my ulimit open files? >> >> No. (It's ARG_MAX...) > > I'm running Mandrake 9.0 and my ARG_MAX is not set, so is it > "unlimited"? If not, what is the default?
for a linux box, this number is hidden inside: [panda]$ grep ARG_MAX /usr/include/linux/limits.h #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ [panda]$ > > Is it the same on other *nix systems? > no. it's not always the same for all *nix system. openBSD: [tiger]# grep ARG_MAX /usr/include/sys/syslimits.h #define ARG_MAX (256 * 1024) /* max bytes for an exec function */ [tiger]# this is implementation dependent. if you run into this limit, consider using xargs if your system has it. man xargs. david -- $_=q,015001450154015401570040016701570162015401440041,,*,=*|=*_,split+local$"; map{~$_&1&&{$,<<=1,[EMAIL PROTECTED]||3])=>~}}0..s~.~~g-1;*_=*#, goto=>print+eval -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]