Subject: Re: grep -r
To: None <claude.marinier@dreo.dnd.ca>
From: Chris G. Demetriou <cgd@sibyte.com>
List: netbsd-help
Date: 02/15/2001 11:35:39
claude.marinier@dreo.dnd.ca (Claude Marinier) writes:
> I sometimes use
> 
> 	find . -name '*.c' -exec grep -H stdlib {} \;

find . -name "*.c" | xargs grep ...

will be a bit more efficient, in all likelyhood.

(it can also be a bit more easily flexible, e.g.: 'find . -type f |
grep -v CVS | xargs grep ...'  I'm sure you could get rid of all the
CVS dirs using an appropriately-build 'find' expression, but really
that's not worth the effort in my opinion.  8-)


I've never used 'grep -r'.  8-)


cgd