[techtalk] Limits of grep?
Julie
jockgrrl at ix.netcom.com
Tue Sep 26 07:59:49 EST 2000
From: Subba Rao <subb3 at attglobal.net>
> 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"
You're exceeding the longest argument list which can be passed
to a command via the exec() call. This is NCARGS_MAX.
> What is the file argument limit for grep? I guess you need the grep source
> for this. I did not find any information in the man page.
Nope, this is a kernel limit.
> Are there any other recommended tools to search through such large list of
> files?
find . -type f -print | xargs grep <pattern> /dev/null
-- Julie.
More information about the Techtalk
mailing list