From owner-freebsd-questions Fri Mar 17 17:49:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from pop.idx.com.au (pop.idx.com.au [203.14.30.10]) by hub.freebsd.org (Postfix) with ESMTP id 038F437B9D8 for ; Fri, 17 Mar 2000 17:49:36 -0800 (PST) (envelope-from dannyh@idx.com.au) Received: from freebsd.freebsd.org (idxwc07-20.idx.com.au [203.166.2.20]) by pop.idx.com.au (8.9.3/8.9.3) with SMTP id MAA24387; Sat, 18 Mar 2000 12:48:48 +1100 From: Danny To: Kent Stewart , Jerry Preeper Subject: Re: help with find command Date: Sun, 19 Mar 2000 12:51:41 +1100 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain Cc: freebsd-questions@FreeBSD.ORG References: <38D27307.880CB12C@3-cities.com> MIME-Version: 1.0 Message-Id: <00031912521602.00663@freebsd.freebsd.org> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello - why not use the "locate" command. - instead of the "find" command - do a "man locate" On Sat, 18 Mar 2000, Kent Stewart wrote: > Jerry Preeper wrote: > > > > I have been using the find command to search for files periodically that > > contain certain phrases throughout the web directory like this > > find . -exec grep -l "getimage.cgi" {} \; 2> /www/jerry/wrong-banners.txt > > For starters I would add -name "*.htm*" after the dot(.) and then > change the -l to -L. Add what ever string you are looking for after > the "-L". From man grep, the -L identifes files that do not contain > the string. > > Kent > > > which has been really useful. I just run it from the top of my htdocs > > directory and it goes through all the subdirectories. Basically it finds > > any pages that my ad banner code is messed up on. Now I'd like to be able > > to find any file on my web directory that _doesn't_ have a certain phrase > > in it. All of my web pages should have ad banner code that runs from a > > script called getad.cgi Maybe find isn't the right command for this > > task, but I want to find any page that has a .htm* extension that does not > > contain the phrase getad.cgi in htdocs or any subdirectory under it. > > Anyone have any pointers to help me get started... > > > > Jerry > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > -- > Kent Stewart > Richland, WA > > mailto:kstewart@3-cities.com > http://www.3-cities.com/~kstewart/index.html > http://daily.daemonnews.org/ > > SETI (Search for Extraterrestrial Intelligence) @ Home > http://setiathome.ssl.berkeley.edu/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message