From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/8230 Path: news.gmane.org!not-for-mail From: martin Newsgroups: gmane.emacs.gnus.user Subject: Re: grep a string in different maps. Date: Fri, 17 Nov 2006 22:02:22 +0100 Organization: none Message-ID: References: <1163757458.679316.268560@e3g2000cwe.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163799720 17868 80.91.229.2 (17 Nov 2006 21:42:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Nov 2006 21:42:00 +0000 (UTC) Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Fri Nov 17 22:41:56 2006 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GlBT9-0004Lp-Lq for gegu-info-gnus-english@m.gmane.org; Fri, 17 Nov 2006 22:41:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlBT9-0007UW-5v for gegu-info-gnus-english@m.gmane.org; Fri, 17 Nov 2006 16:41:55 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus X-Shakespeare: "Honest plain words best pierce the ear of grief." -- Love's Labour's Lost, V.2.753 User-Agent: Emacs Gnus Cancel-Lock: sha1:7LEqK4kgyIacUte9VZihtR6+NKw= Original-Lines: 38 Original-NNTP-Posting-Date: 17 Nov 2006 22:02:48 CET Original-NNTP-Posting-Host: 007be789.newsspool1.arcor-online.net Original-X-Trace: DXC=M_`90lbm^N8nBOkdL^Lo7>ic==]BZ:af>4Fo<]lROoR1^YC2XCjHcb9AE9TAi6be^3Y=5kO30HmD9a\Y^Ri8SL=:fU@m?64gYE0 Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.gnus:78416 Original-To: info-gnus-english@gnu.org X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:8230 Archived-At: >>>>> william a george writes: > Date: 17 Nov 2006 01:57:38 -0800 > > Hi. > I have a problem. > I'm using emacs on windows xp. I donwloaded some .exe file to be able > to run UNIX commands on window (it's called UnixUtils). > What I need to perform is to search for a string in files. Grep finds > the string if the files are in the same directory. But my problem is > that I want to perform this search on files that exist in other > directories. > A little description of my directory tree: > - SW (directory) > - logical (directory) > - terminal (directory) > - OS (directory) > If I'm standing in the terminal directory then it is OK to find a > string among the files in "terminal", but if I want to find the string > when I'm standing in "SW" then it not possible. Grep cannot recurse > through the directories. > I tried this combination also: find . -name * -exec grep -n string NUL > {} > And I got a negative result too. Hi, how was the result negative ? I presume, you supplied the above command line by executing "grep-find". Provide the find command with your "root" directory "SW (directory)" instead of "." and surround the wild card * with double quotes. (find -name "*" -exec grep -n {} NUL \;) Martin -- parozusa at web dot de