From owner-freebsd-stable Wed Jun 16 5:20:32 1999 Delivered-To: freebsd-stable@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id E45F414E20 for ; Wed, 16 Jun 1999 05:20:29 -0700 (PDT) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.1) id OAA83189; Wed, 16 Jun 1999 14:20:25 +0200 (CEST) (envelope-from des) To: chris Cc: Ben Smithurst , kip@lyris.com, freebsd-stable@FreeBSD.ORG Subject: Re: open files References: From: Dag-Erling Smorgrav Date: 16 Jun 1999 14:20:24 +0200 In-Reply-To: chris's message of "Tue, 15 Jun 1999 15:39:47 -0700 (MST)" Message-ID: Lines: 21 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG chris writes: > why? I was always fond of stuff like: > vi `find /usr/src/sys -exec grep -l "SYSCTL.*maxfiles" \{\} \;` ...which forks a separate grep process for every single file in the source tree (somewhere between three and four thousand files, depending on whether you use CVS or CVSup), and only shows the names of the files where matches are found (if you remove the -l, it only shows the matches without the file names). Neither does it allow you to fine-tune the set of files to grep, like this: # cd /usr/src/sys # find . -type f | grep -v /CVS/ | xargs grep 'SYSCTL.*maxfiles' Yes, I know about the -name predicate, but it's not very flexible since it's a glob pattern, not a regexp, and only applies to the file name itself, not to its path. DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message