Date: Thu, 12 May 2005 19:28:27 +0200 From: Roland Smith <rsmith@xs4all.nl> To: FreeBSD - Questions <freebsd-questions@freebsd.org> Subject: Re: Scripting help Message-ID: <20050512172827.GA18666@slackbox.xs4all.nl> In-Reply-To: <42838801.1000507@makeworld.com> References: <42838801.1000507@makeworld.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Thu, May 12, 2005 at 11:44:49AM -0500, Chris wrote: > I would like some advice on how to script something that will search > directories below a named root for all files ending with a certain file > extension. Finding files is done (unsurprisingly) with find. E.g. to find all .c files under the current directory do: find . -name *.c Find can select files based on many other criteria. See the find manual page for more detail. You can then pipe the output through xargs to do things with the files. Roland -- R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text. public key: http://www.xs4all.nl/~rsmith/pubkey.txt [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCg5I7EnfvsMMhpyURAgiqAKCjEHORH8wBmwPg6AMHfw/d1J5fCgCgoq6z ICs75rL/Nc+sQe/ktCnMkqk= =5yqB -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050512172827.GA18666>
