Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2001 00:25:39 +0000
From:      Ceri <setantae@submonkey.net>
To:        Drew Tomlinson <drew@mykitchentable.net>
Cc:        questions@freebsd.org
Subject:   Re: How To Recursively Search Directory For Text String In Files?
Message-ID:  <20011228002539.GA82923@rhadamanth>
In-Reply-To: <011701c18f24$951d3b00$c42a6ba5@lc.ca.gov>
References:  <011701c18f24$951d3b00$c42a6ba5@lc.ca.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 27, 2001 at 02:19:42PM -0800, Drew Tomlinson wrote:
> OK, I am beginning to understand the power of FBSD and am sure this is
> possible.  I just don't know how to do it.  What I want to do is search
> all files in my current directory and all the directories below it for a
> text string and then know what file(s) contains the string.  I
> understand that grep will do the search but my knowledge is limited to
> "cat file.txt | grep string".

grep -r string *

Ceri

-- 
keep a mild groove on

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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