[Scottish] Best way to find text within files recursively?

Michael Cameron scottish at mailman.lug.org.uk
Sun Jan 19 23:21:01 2003


>
>find . -type f -print0 |xargs -0 grep 'foo'
>
I'd go for:

find . -type f -exec grep 'foo' {} /dev/null \;

or possibly:

find . -type f -exec grep -q  'foo' {} \; -print