From owner-freebsd-questions@FreeBSD.ORG Wed Oct 22 06:47:15 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F11D16A4B3 for ; Wed, 22 Oct 2003 06:47:15 -0700 (PDT) Received: from priv-edtnes28.telusplanet.net (outbound04.telus.net [199.185.220.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F70543F93 for ; Wed, 22 Oct 2003 06:47:14 -0700 (PDT) (envelope-from viktorlazlo@telus.net) Received: from [192.168.1.100] ([66.183.123.52]) by priv-edtnes28.telusplanet.netESMTP <20031022134713.NZOI12883.priv-edtnes28.telusplanet.net@[192.168.1.100]>; Wed, 22 Oct 2003 07:47:13 -0600 Date: Wed, 22 Oct 2003 06:46:54 -0700 (PDT) From: Viktor Lazlo X-X-Sender: viktorlazlo@njamn8or.bc.hsia.telus.net To: jason dictos In-Reply-To: <200310211158.11136.jason@dictos.com> Message-ID: <20031022064243.U51615@njamn8or.bc.hsia.telus.net> References: <200310211158.11136.jason@dictos.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: questions@freebsd.org Subject: Re: Searching contents of files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2003 13:47:15 -0000 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