Summary: how to set maxdepth with sun find?

From: Martin Meadows (
Date: Fri Sep 01 2000 - 14:32:38 CDT

Thanks to the folks who responded to my question:

From: "Bageshwar X Kumar" <>
From: "Jonathon W. Ross" <>
From: Brad Young <>
From: "Jason K. Schechner" <>

Hope I didn't forget anyone.

Sounds like gnu find may be the best way to deal with this
problem. Apparently gnu find has a -maxdepth option.

Brad provided an interesting solution for looking 1 or 2
layers deep with solaris find:

For examining the current directory:
find . ! -name . -prune -print

... and for examining the directories beneath the current
find ./.??*/.??* ./*/* ./.??*/* ./*/.??* ! -name . -prune -print

Here's the original question:

On Thu, 31 Aug 2000, Martin Meadows wrote:

> Can someone tell me how to set the maximum depth of directories
> searched with the solaris find command? I'm interested in
> searching for files in all directories one level below my
> current directory.
> Thanks,
> Martin Meadows
> Indianapolis, In.

U BEFORE POSTING please READ the FAQ located at
. and the list POLICY statement located at
A To submit questions/summaries to this list send your email message to:
A To unsubscribe from this list please send an email message to:
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:16 CDT