Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: comp.unix.wizards Subject: Re: recursive grep Message-ID: <12068@ulysses.homer.nj.att.com> Date: 23 Aug 89 01:00:22 GMT References: <122979@sun.Eng.Sun.COM> <13710@polyslo.CalPoly.EDU> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Organization: AT&T Bell Laboratories Lines: 13 In article <13710@polyslo.CalPoly.EDU> steve@polyslo.CalPoly.EDU (Steve DeJarnett) writes: > If you're trying to grep for a string in every file in or below the >current directory, why not do this: > > find . -type f -exec grep string {} \; Because exec'ing one grep for each file is slower than exec'ing one grep with multiple file arguments for each directory in the hierarchy. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com