Searching contents of files

Viktor Lazlo viktorlazlo at telus.net
Wed Oct 22 06:47:15 PDT 2003



On Tue, 21 Oct 2003, jason dictos wrote:

>    I've always used grep text /*/*/* to recursivly search directories for
> files with the specified text string in them, however this method doesn't
> always work very well (sometimes it bails out halfway through with error
> "Argument list too long").
>
> Is there a more effective way to search the contents of files?

Try:

     find /whateverdirectory -type f -print | xargs grep mysearchstring

Cheers,

Viktor


More information about the freebsd-questions mailing list