Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2009 17:52:36 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Zbigniew Szalbot <z.szalbot@lcwords.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: find and searching for specific expression in files
Message-ID:  <alpine.BSF.2.00.0905301752100.18381@wojtek.tensor.gdynia.pl>
In-Reply-To: <dd6b168d2af9ddbcfc52e5c0397e4d6a.squirrel@relay.lc-words.com>
References:  <dd6b168d2af9ddbcfc52e5c0397e4d6a.squirrel@relay.lc-words.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> I am using find in the following manner:
>
> find /path/to/files/ -mtime -2 -ls |less
> to find files which have been recently modified. But I would like to
> extend the search to find specific expression within files. -name is used
> to specify file name. How can I search for strings within text?

no matter how you generate the list of files to search, use grep then on 
that list



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