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>
next in thread | previous in thread | raw e-mail | index | archive | help
--zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=20 > directories below a named root for all files ending with a certain file= =20 > extension. Finding files is done (unsurprisingly) with find. E.g. to find all .c files under the current directory do:=20 find . -name *.c Find can select files based on many other criteria. See the find manual page for more detail. =20 You can then pipe the output through xargs to do things with the files. Roland --=20 R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text. public key: http://www.xs4all.nl/~rsmith/pubkey.txt --zhXaljGHf11kAtnf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCg5I7EnfvsMMhpyURAgiqAKCjEHORH8wBmwPg6AMHfw/d1J5fCgCgoq6z ICs75rL/Nc+sQe/ktCnMkqk= =5yqB -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050512172827.GA18666>