Date: Sat, 16 Mar 2002 19:00:02 -0500 (EST) From: "jamgill@uu.net" <jamgill@UU.NET> To: Peter Leftwich <Hostmaster@Video2Video.Com> Cc: Kris Kennaway <kris@obsecurity.org>, FreeBSD Questions <FreeBSD-Questions@FreeBSD.ORG> Subject: Re: find /etc -name conf -print [*conf*?] Message-ID: <Pine.GSO.4.20.0203161847190.13700-100000@haiti.corp.us.uu.net> In-Reply-To: <20020316183843.M18121-100000@earl-grey.cloud9.net>
next in thread | previous in thread | raw e-mail | index | archive | help
`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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.20.0203161847190.13700-100000>