[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limits of grep?



Subba Rao wrote:
> 
> Hi
> 
> I have a directory of 10000+ text files and would like to search for
> some strings in these files. When I tried using "grep" command with an
> asterisk, I get the error message somthing to the effect,
> 
>         "File argument list too long"
> 

Besides Shachar's answer about using 'find', you could also use the
'xargs' command. In this case, 'ls | xargs grep <pattern>' should do the
trick.

Gavrie.

-- 
Gavrie Philipson
Netmor Applied Modeling Research Ltd.

=================================================================
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