From owner-freebsd-questions Sat Mar 16 16: 0:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from cmr0.ash.ops.us.uu.net (cmr0.ash.ops.us.uu.net [198.5.241.38]) by hub.freebsd.org (Postfix) with ESMTP id B209F37B402 for ; Sat, 16 Mar 2002 16:00:21 -0800 (PST) Received: from csserve0.corp.us.uu.net by cmr0.ash.ops.us.uu.net with ESMTP (peer crosschecked as: csserve0.corp.us.uu.net [153.39.88.140]) id QQmgmq04221; Sun, 17 Mar 2002 00:00:13 GMT Received: from haiti.corp.us.uu.net by csserve0.corp.us.uu.net with ESMTP (peer crosschecked as: localhost [127.0.0.1]) id QQmgmq07059; Sat, 16 Mar 2002 19:00:04 -0500 (EST) Received: from localhost (jamgill@localhost) by haiti.corp.us.uu.net (8.10.2+Sun/8.9.3) with ESMTP id g2H003o13780; Sat, 16 Mar 2002 19:00:03 -0500 (EST) X-Authentication-Warning: haiti.corp.us.uu.net: jamgill owned process doing -bs Date: Sat, 16 Mar 2002 19:00:02 -0500 (EST) From: "jamgill@uu.net" X-Sender: jamgill@haiti.corp.us.uu.net To: Peter Leftwich Cc: Kris Kennaway , FreeBSD Questions Subject: Re: find /etc -name conf -print [*conf*?] In-Reply-To: <20020316183843.M18121-100000@earl-grey.cloud9.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG `man find` has a pretty good example: EXAMPLES The following examples are shown as given to the shell: find / \! -name "*.c" -print Print out a list of all the files whose names do not end in .c. so therefore: find /etc -name "*conf*" should match everything in the /etc/ directory with the string 'conf' as part of the filename. I've included a list of the files it matched on my system for you to notice what it does collect. Sculpt your regular expression (the part inside the quotes) to match precisely the ones you want with the knowledge inside the manpage for re_format(7) and/or use the other switches explained in the find(1) manpage to collect just the filenames you seek. --gill On Sat, 16 Mar 2002, Peter Leftwich wrote: > On Fri, 8 Mar 2002, Kris Kennaway wrote: > > On Fri, Mar 08, 2002 at 10:04:30PM -0500, Peter Leftwich wrote: > > PL> Why does this command fail to return any *.conf files? > > Because you forgot to include a glob wildcard, so the pattern only matches files exactly named 'conf' > > Kris > > How would one correct the command line to include results for filenames > such as "rc.conf" and "myconfiguration.txt," etc...? > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --gill | Tatu Ylonen, SSH 1.2.12 README: "Beware that the most effective | way for someone to decrypt your data may be with a rubber hose." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message