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



LOD Communications, Inc.
Editors note:

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

Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them.

I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.




Comments


Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments

If you want a picture to show with your comment, go get a Gravatar



/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


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!





More:
       - Newsgroup




Related Posts

Grep in Depth

Xargs test question

Grep awk example`

Xargs test question

How do I solve an "arglist too long"?

grep and ps

Xargs

How do I recursively grep through sub directories?

Wrapping scripts










Change Congress