From owner-freebsd-questions Sat Mar 18 13:49: 6 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.x-treme.gr (mail2.x-treme.gr [212.120.196.24]) by hub.freebsd.org (Postfix) with ESMTP id 32B9837B5E4 for ; Sat, 18 Mar 2000 13:49:01 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from hades.hell.gr (pat7.x-treme.gr [212.120.197.199]) by mail2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with ESMTP id XAA27928; Sat, 18 Mar 2000 23:48:46 +0200 Received: (from charon@localhost) by hades.hell.gr (8.9.3/8.9.3) id XAA20945; Sat, 18 Mar 2000 23:35:13 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 18 Mar 2000 23:35:13 +0200 From: Giorgos Keramidas To: Kent Stewart Cc: Jerry Preeper , freebsd-questions@FreeBSD.ORG Subject: Re: help with find command Message-ID: <20000318233513.C20206@hades.hell.gr> Reply-To: keramida@ceid.upatras.gr References: <3.0.5.32.20000317034932.0087b9c0@cts.com> <38D27307.880CB12C@3-cities.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <38D27307.880CB12C@3-cities.com>; from kstewart@3-cities.com on Fri, Mar 17, 2000 at 10:01:43AM -0800 X-PGP-Fingerprint: 62 45 D1 C9 26 F9 95 06 D6 21 2A C8 8C 16 C0 8E Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 17, 2000 at 10:01:43AM -0800, 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. At times, find option `-type f' might also prove handy. I've seen a directory entry being written on my terminal, because it was lucky (or unlucky) enough to contain the pattern I looked for ;) - Giorgos Keramidas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message