  | |  | About grep | About grep 2004-01-18 - By Matthew Gillen
Back John McKowen Taylor, Jr. wrote:
> >Date: Sun, 11 Jan 2004 19:38:15 -0800 (PST)
> >From: Jack Wang <jwus2001@(protected) >
> >To: redhat-list@(protected)
> >Content-Type: text/plain; charset=us-ascii
> >List-Id: General Red Hat Linux discussion list <redhat-list.redhat.com >
> >Subject: About grep
> >
> >I can use the following grep command to find a string
> >in current directory:
> >
> >grep "abc " *.*
> >
> >How to find a string recursively into subdirectories?
>
> My personal favorite is still:
>
> find . -type f -exec grep 'abc ' {} /dev/null \;
>
Why not just:
grep -rn "abc " .
Prints filenames and linenumbers, searches recursively (starting with
". ", the current directory).
--Matt Gillen
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
|
|
 |