Date: Sat, 13 Jul 1996 22:10:03 -0500 (CDT) From: David Kelly <dkelly@hiwaay.net> To: Gary Kline <kline@tera.com> Cc: tcg@ime.net, questions@freebsd.org Subject: Re: Recursive grep. Message-ID: <XFMail.960713221328.dkelly@hiwaay.net> In-Reply-To: <199607140128.SAA09139@athena.tera.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23:28:33 Gary Kline wrote: >>According to Gary Chrysler: >> Sean Kelly wrote: >> > >> > >>>>> "Gary" == Gary Chrysler <tcg@ime.net> writes: >> > >> > Gary> Could someone please show me an example using grep to search >> > Gary> through files in a tree. ie: recursivly. >> > >> > find <tree-root> -type f | xargs grep <pattern> /dev/null > > If some of you unix command wizards will indulge > me: why is ``/dev/null'' at the end of the > command?? I dunno, but I'm not a Unix wizard. :-) I've always used with success: find <tree-root> -type f -exec grep -l <pattern> {} \; usually use "grep -il ..." but you get the idea.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.960713221328.dkelly>