Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More directory 1

Status
Not open for further replies.

biondo68

Technical User
Jul 4, 2003
103
IT
Hi all,

I have a filesystem with more directory (546 )and subdirectory ..

My hope is to have a list with only one line per directory without subdirectory

I use Find in conjunction with Sort but is no good

find ./ -type d |sort -u


O.S Sun Solaris 10

Help me , thanks

Biondo68
 
What about this ?
find * -type d -prune

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Or this (inefficient) ?
find ./ -type d | awk -F/ NF==2

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
And if you have a GNU find at hand:
gfind . -maxdepth 1 -type d

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top