recursive directories with grep


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):

SCOFAQ/scotec6.html#recursivegrep is another thing to look at.


Hate these ads?



From: Xaonon <xaonon@hotpop.com>
Subject: Re: Basic Grep question - I think.
Date: 20 Nov 2002 03:53:43 GMT References: <utm13srcq45j04@corp.supernews.com>



Ned i bach <utm13srcq45j04@corp.supernews.com>, Archie Campbell
<archie@accordsystems.com> teithant i thiw hin: 



> I discover grep.
> I can do
> grep 192.168.1.1 /etc/*.*

> But this only does all the files in one directory.
> How do I do a search through that directory and all its sub-directories.
> I cant find it in my "Unix Weekend Crash Course" or in "man grep"














Perhaps something like



grep '192.168.1.1' /etc -d recurse



-- 
Xaonon, EAC Chief of Mad Scientists and informal BAAWA, aa #1821, Kibo #: 1
Visit The Nexus Of All Coolness (i.e. my site) at http://xaonon.dyndns.org/
"Remember, kids!  Don't try to stop Russians from picking mushrooms!  Or
they'll nuke you!" -- James "Kibo" Parry, in alt.religion.kibology



ad
Editors note:

Linux and BSD grep have "-d" which applies to directories and can take the argument "read", "skip", or "recurse".



Comments /Bofcusm/1780.html


Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


ad

Views for this page
Today This Week This Month This Year  Overall
3571601,778 7,230

/Bofcusm/1780.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Newsgroup




Related Posts

Grep awk example`

Grep in Depth

How do I solve an "arglist too long"?

grep and ps

Xargs test question

Xargs test question

Wrapping scripts

How do I recursively grep through sub directories?

Xargs


Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://www.vss3.com SCO/Caldera OpenServer, Unixware & Linux. Tarantella & Non-stop Clustering


http://www.schewanick.com SCO Unix, Solaris, Linx (various), PHP, MySQL, Apache, uniBasic, dL4, Perl, System Administration and more....


http://bcstechnology.net Full service Linux & UNIX systems integrator; Windows to UNIX/Linux Client-Server Specialist; Secure E-Mail & Website Hosting; Thoroughbred Software Developer; Custom Industrial Automation; Hardware & Electronics Experts; In Business Since 1985.









Change Congress

Related Posts