From owner-freebsd-questions Mon Dec 17 3:32:12 2001 Delivered-To: freebsd-questions@freebsd.org Received: from marble.dublin.wbtsystems.com (marble.dublin.wbtsystems.com [193.120.231.8]) by hub.freebsd.org (Postfix) with ESMTP id 4CFB637B41C for ; Mon, 17 Dec 2001 03:30:34 -0800 (PST) Received: from spiral (spiral.dublin.wbtsystems.com [193.120.231.190]) (authenticated) by marble.dublin.wbtsystems.com (8.11.6/8.11.6) with ESMTP id fBHBUQA71846; Mon, 17 Dec 2001 11:30:26 GMT From: "Barry Byrne" To: , Subject: RE: /bin/sh script to walk through a filetree? [shell, example, file, directory, tree] Date: Mon, 17 Dec 2001 11:30:25 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20011217122028.K21241@xs4all.nl> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal 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 Hi: The find command should do what you want. There are many ways to use it (man find) but you might want to start with something like: find /path/to/search -exec mycommand {} \; This will run 'mycommand' with an argument of each file that is found. Cheers, Barry -- Barry Byrne, IT Manager, WBT Systems, Block 2, Harcourt Centre Harcourt Street, Dublin 2, Ireland > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of rene@xs4all.nl > Sent: 17 December 2001 11:20 > To: questions@FreeBSD.ORG > Subject: /bin/sh script to walk through a filetree? [shell, example, > file, directory, tree] > > > Hi. I need to do 'something' with all or some files in a > directory tree. Can > someone perhaps point me to a skeleton example that shows me how to walk > recursively through a filetree, listing all files/directories in it? > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message