On Fri, Feb 22, 2008 at 12:08:54AM +0200, Jussi Peltola wrote:
> On Thu, Feb 21, 2008 at 11:22:25PM +0200, [EMAIL PROTECTED] wrote:
> > For instance 'ggrep -r ...' instead of 'grep -r ...' to search recursively
> > with gnu grep (a worthless feature imho).
> 
> Displaying the name of the file and the matched line nicely like grep -r
> does is not elegant with find + grep without using a script or a long
> and inelegant alias - or if it is, I'd be interested in how it can be
> done in case I need to work on some ancient unix.

$ find DIR -type f -print0 | xargs -0 grep PATTERN

which, unlike 'find ... -exec' is just as fast as 'grep -r', and unlike
'grep -r', will skip special devices, symlinks, etc.

Reply via email to