find in conjuction with grep
Robert P. J. Day
rpjday at mindspring.com
Wed Aug 11 18:49:13 UTC 2004
On Wed, 11 Aug 2004, Kevin Old wrote:
> I was unclear. I'd like to recursively search directories in order to
> find "phrase I want" inside files, not as the file name.
$ grep -r "microsoft sux" <dir names here>
$ grep -rl "microsoft sux" <dir names here>
the first will print each line that matches within any file. the
second will only list the containing file name, if that's all you're
after.
obviously, all of the other standard grep options (-i, -w, etc.) can
be added to the mix.
rday
More information about the fedora-list
mailing list