[PLUG] Re: Unix Tip: TOO MANY FILES AROUND

Roderick A. Anderson raanders at acm.org
Wed Oct 11 15:34:59 UTC 2006


Auke Kok wrote:
> Roderick A. Anderson wrote:
> 
>> This just came through today.  It appears it isn't just a Linux 
>> "Issue". :-)
>>
>>
>> Rod
> 
>  >
>  >
>  > $grep "ABC" *
>  >
>  > And it fails saying with
>  >
>  > ksh: /usr/bin/find: 0403-027 The parameter list is too long.
>  >
>  > what would you do?
>  >
>  > Well you can do the following:
>  >
>  > $ls |xargs grep "ABC"
> 
> That's rather funny - effectively it should do the same, except that 
> xargs doesn't call the shell to pass the arguments. Apparently on that 
> platform `ksh` is limiting the amount of arguments more than the 
> platform itself, and I would definately consider that a ksh bug :)
> 
> It also exposes that ksh uses /usr/bin/find internally in a rather 
> stupid way :)
> 
> Anyway, if you're really doing something like above, you should have used:
> 
> grep -r "ABC" .
> 
> which doesn't care how many files there are :)

All the time, but this post was in reference to a thread earlier this week.


Rod
-- 
> 
> 
> Cheers,
> 
> Auke
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug




More information about the PLUG mailing list