[Cialug] Find Files with String

Dave Weis djweis at internetsolver.com
Fri Dec 11 10:46:59 CST 2009


find . -exec grep -H string {} \;

Todd Walton wrote:
> Can anyone suggest a bash one liner to find all text files that have a
> certain string in them and print the names?
> 
> I've been playing around with 'for-do-done', but I'm wondering now if
> maybe 'find' might be better.
> 
> --
> Todd
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug




-- 
Dave Weis
515-224-9229
djweis at internetsolver.com
http://www.internetsolver.com/
Please check out our Complete Support Service
http://www.internetsolver.com/completesupport/


More information about the Cialug mailing list