[Cialug] Find Files with String

Josh More morej at alliancetechnologies.net
Fri Dec 11 11:09:09 CST 2009


Or grep -rl "string" /  :)

It would, however, be wise to do as others have suggested and exclude
/dev/, /proc/, /sys/ etc.

Grepping /dev/zero might take a while.  ;)



-Josh More, RHCE, CISSP, NCLP, GIAC 
 morej at alliancetechnologies.net 
 515-245-7701

>>> Todd Walton  12/11/09 11:04 AM >>>
On Fri, Dec 11, 2009 at 10:51 AM, Josh More
<morej at alliancetechnologies.net> wrote:
> Yep.
>
> grep -r "string" /

The problem there is that it prints the matched lines as well.  I want
just the names.

I could put that output into cut though.  That's it!

grep "string" * | cut -d: -f1 -s

--
Todd
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list