From owner-freebsd-questions Fri Mar 17 3:48:14 2000 Delivered-To: freebsd-questions@freebsd.org Received: from usagi.cts.com (usagi.cts.com [209.68.192.66]) by hub.freebsd.org (Postfix) with ESMTP id EAAE737B5B3 for ; Fri, 17 Mar 2000 03:48:11 -0800 (PST) (envelope-from preeper@cts.com) Received: from backshop (gt361.cts.com [204.212.158.91]) by usagi.cts.com (8.9.3/8.9.3) with SMTP id DAA17542; Fri, 17 Mar 2000 03:48:09 -0800 (PST) Message-Id: <3.0.5.32.20000317034932.0087b9c0@cts.com> X-Sender: preeper@cts.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Fri, 17 Mar 2000 03:49:32 -0800 To: freebsd-questions@freebsd.org From: Jerry Preeper Subject: help with find command Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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