Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2003 06:46:54 -0700 (PDT)
From:      Viktor Lazlo <viktorlazlo@telus.net>
To:        jason dictos <jason@dictos.com>
Cc:        questions@freebsd.org
Subject:   Re: Searching contents of files
Message-ID:  <20031022064243.U51615@njamn8or.bc.hsia.telus.net>
In-Reply-To: <200310211158.11136.jason@dictos.com>
References:  <200310211158.11136.jason@dictos.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031022064243.U51615>