Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2001 11:30:25 -0000
From:      "Barry Byrne" <barry.byrne@wbtsystems.com>
To:        <rene@xs4all.nl>, <questions@FreeBSD.ORG>
Subject:   RE: /bin/sh script to walk through a filetree? [shell, example, file, directory, tree]
Message-ID:  <NCBBIAMNAKDKFJIIGNPKOEKHGNAA.barry.byrne@wbtsystems.com>
In-Reply-To: <20011217122028.K21241@xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NCBBIAMNAKDKFJIIGNPKOEKHGNAA.barry.byrne>