>Date: Sun, 11 Jan 2004 19:38:15 -0800 (PST) >From: Jack Wang <jwus2001@xxxxxxxxx> >To: redhat-list@xxxxxxxxxx >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@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list