From: Sven Hilmer on
Hi all

can someone tell me howto invoke 'find' to examine the entire system
excluding some dirs from / ?

e.g.

I want to perform find on the entire system but want to exclude /proc,
/export/zones but include /export/home. It seems that -prune cannot do
this.

kind regards
Sven
From: hama08 on

hi

maybe
find / /export/home -mount

kind regards
hans


On 23 Jun., 09:38, Sven Hilmer <shil...(a)invalid.invalid> wrote:
> Hi all
>
> can someone tell me howto invoke 'find' to examine the entire system
> excluding some dirs from / ?
>
> e.g.
>
> I want to perform find on the entire system but want to exclude /proc,
> /export/zones but include /export/home. It seems that -prune cannot do
> this.
>
> kind regards
> Sven

From: Sven Mascheck on
Sven Hilmer wrote:

> I want to perform find on the entire system but want to exclude /proc,
> /export/zones but include /export/home. It seems that -prune cannot do
> this.

Right, not reliably: You could exclude the directory names "proc" and
"zones". However this will exclude all subdirectories with these names.
Strictly speaking, you need an expression like -path (if there's no
workaround by help of yet other criteria).

The expression -path has been included in latest release of
POSIX, but it was never implemented in the SVR4 line and thus
is still missing on Solaris, currently.

You could try to use an alternative toolchest, which implements
the expression -path, like AT&T AST, sfind, or GNU find.
From: hama08 on
On 23 Jun., 14:15, Sven Mascheck <masch...(a)email.invalid> wrote:
> Sven Hilmer wrote:
> > I want to perform find on the entire system but want to exclude /proc,
> > /export/zones but include /export/home. It seems that -prune cannot do
> > this.
>

or a combination with egrep

find / | egrep -v '^/proc|^/export/zones'


kind regards
hans