From owner-freebsd-questions@FreeBSD.ORG Thu May 12 17:28:29 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBFE516A4CE for ; Thu, 12 May 2005 17:28:29 +0000 (GMT) Received: from smtp-vbr10.xs4all.nl (smtp-vbr10.xs4all.nl [194.109.24.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C03B43D88 for ; Thu, 12 May 2005 17:28:29 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) j4CHSRKl046566; Thu, 12 May 2005 19:28:27 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 356E666CB; Thu, 12 May 2005 19:28:27 +0200 (CEST) Date: Thu, 12 May 2005 19:28:27 +0200 From: Roland Smith To: FreeBSD - Questions Message-ID: <20050512172827.GA18666@slackbox.xs4all.nl> Mail-Followup-To: FreeBSD - Questions , Chris References: <42838801.1000507@makeworld.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <42838801.1000507@makeworld.com> User-Agent: Mutt/1.4.2.1i X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! Organization: Me, organized? X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Scripting help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2005 17:28:30 -0000 --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--