Date: Tue, 14 Oct 1997 13:25:10 -0400 (EDT) From: "Art S. Kagel" Reply-To: kagel AT ns1 DOT bloomberg DOT com To: eyal DOT ben-david AT aks DOT com Cc: eliz AT is DOT elta DOT co DOT il, djgpp AT delorie DOT com Subject: Re: ANNOUNCE: Grep 2.1 uploaded In-Reply-To: <42256530.003743EC.00@aks.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 14 Oct 1997 eyal DOT ben-david AT aks DOT com wrote: > Thanks ! > Apropos grep, I didn't find an option for 'grepping' also in > subdirectories. > Do I have to specify the dirs in the command line ? > Is there any tool that does it (with or without grep) ? Try: grep unistd.h *.c */*.c */*/*.c or more generally you can combine grep with find: find . -name '*.c' -exec grep unistd.h {} \; -print The filename will follow any matches and only those files that have matches will be printed. Moving the -print to before -exec prints the names of all files checked each followed by any matches. Art S. Kagel, kagel AT bloomberg DOT com