On Wed, 03 Nov 2004 13:25:38 +1300 Matthew Gregan <[EMAIL PROTECTED]> wrote:
> At 2004-11-03T12:59:04+1300, Nick Rout wrote: > > [EMAIL PROTECTED] cur $ grep gsa * > > -/bin/bash: /bin/grep: Argument list too long > > [EMAIL PROTECTED] cur $ ls|wc > > 4299 4299 339962 > > $ getconf ARG_MAX > 131072 > > 339962 > ARG_MAX. > > > on another box grep copes well with a directory of over 5000 files, > > albeit with 5 character file names. > > 25000 < ARG_MAX. > > > so, whats the easiest way to do what i want? > > The two Tims have anwswered this bit already. > > > I'd also be interested to know whether this is to do with the number > > of arguments, or the total number of characters in the argument list? > > It's the total number of characters. The limit (defined as ARG_MAX) > differs between systems; the system I am typing this on has an ARG_MAX > limit of 131072 and the OpenBSD box beside me has a limit of 262144. > Matthew you are a hero, thanks for the info. ARG_MAX is the same on both systems (131072), but clearly on the system that didn't work the total character length of the arguments was considerably longer at 79 characters per filename vs 5. Thanks, good stuff when you learn a new bit of your OS. > Cheers, > -mjg > -- > Matthew Gregan |/ > /| [EMAIL PROTECTED] -- Nick Rout <[EMAIL PROTECTED]>
