**HELP** how to do a listing of dirs and all sub dirs only | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

**HELP** how to do a listing of dirs and all sub dirs only

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-16-2011
bbraml bbraml is offline
Registered User
 
Join Date: Aug 2010
Last Activity: 16 August 2011, 2:18 PM EDT
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
**HELP** how to do a listing of dirs and all sub dirs only

I am trying to get a listing of ALL directories only under /export (as an example). I can get all the dirs directly under /export but I need any sub dirs under those dirs. I've looked (here and google) but can not find anything that works
Sponsored Links
    #2  
Old 08-16-2011
bartus11's Avatar
bartus11 bartus11 is offline Forum Staff  
Moderator
 
Join Date: Apr 2009
Last Activity: 23 September 2014, 12:55 AM EDT
Posts: 3,710
Thanks: 7
Thanked 1,142 Times in 1,113 Posts

Code:
find /export -type d

Sponsored Links
    #3  
Old 08-16-2011
bbraml bbraml is offline
Registered User
 
Join Date: Aug 2010
Last Activity: 16 August 2011, 2:18 PM EDT
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
awesome, thanks!
    #4  
Old 08-16-2011
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 30 September 2014, 4:14 PM EDT
Location: Saskatchewan
Posts: 19,477
Thanks: 794
Thanked 3,286 Times in 3,081 Posts
UNIX tools are flexible enough that you aren't likely to find canned solutions by googling "how do I do x with y". Learning some basic shell programming and shell commands would be a good start since you can do a lot with a little.
Sponsored Links
    #5  
Old 08-16-2011
h@foorsa.biz h@foorsa.biz is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 4 January 2014, 7:56 AM EST
Posts: 567
Thanks: 7
Thanked 46 Times in 44 Posts

Code:
#ls -laR /export | grep ^d

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Move directory + sub dirs AriStar UNIX for Dummies Questions & Answers 1 09-21-2009 09:29 AM
monitoring dirs da-seot Shell Programming and Scripting 1 09-03-2007 02:55 AM
how to synchronize different dirs reldb Shell Programming and Scripting 1 12-09-2006 07:08 PM
Combining Two Dirs Phobos UNIX for Dummies Questions & Answers 2 01-26-2005 08:13 PM
dirs & colors tk876 UNIX for Dummies Questions & Answers 4 07-17-2001 12:03 AM



All times are GMT -4. The time now is 05:54 PM.