find in conjuction with grep

Ulrich Drepper drepper at redhat.com
Wed Aug 11 18:58:47 UTC 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.

Just use grep's -r option:

  grep -r SEARCHTEXT DIR...

You even can exclude certain file names based on patterns.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖





More information about the fedora-list mailing list