From owner-freebsd-hackers Tue Oct 12 10:33: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id BDD1A15C43 for ; Tue, 12 Oct 1999 10:33:03 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p05-dn01kiryunisiki.gunma.ocn.ne.jp [210.132.6.134]) by peach.ocn.ne.jp (8.9.1a/OCN) with ESMTP id CAA25438; Wed, 13 Oct 1999 02:32:59 +0900 (JST) Message-ID: <38036C65.D5B1BD3E@newsguy.com> Date: Wed, 13 Oct 1999 02:14:13 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Search a symbol in the source tree References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Zhihui Zhang wrote: > > Can anyone suggest me a way of searching symbols in the entire /usr/src > tree? I normally use grep */*. But grep does not work recursively, right? > Something like a small shell script may do this. Thanks a lot. find /usr/src -name \*.\[ch] -print | xargs grep pattern or similar. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "I always feel generous when I'm in the inner circle of a conspiracy to subvert the world order and, with a small group of allies, just defeated an alien invasion. Maybe I should value myself a little more?" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message