find in conjuction with grep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I've been using
find . -exec grep "phrase I want" {} \;
for quite a while to search recursively through directories and files
to find a phrase or word.

The results I get back are simply the line(s) that contained the
phrase, but no path or filename.

I'd thought about the -name flag, but I can't seem to figure out how
to use it, though it is more for using to search for file names rather
than display the name, it seems.

Any help is appreciated.

Kevin
-- 
Kevin Old
kevinold@xxxxxxxxx



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux