Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

List directories and sub directories recursively excluding files

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-23-2011
pointers pointers is offline
Registered User
 
Join Date: Apr 2010
Last Activity: 7 June 2012, 8:30 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
List directories and sub directories recursively excluding files

Hi,

Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process.
I wanted to disply using a unix command all the directories recursively excluding files.

I tried 'ls -FR' but that display files as well, need to exclude files.

Regards,
Pointers
Sponsored Links
    #2  
Old Unix and Linux 02-23-2011
pludi's Unix or Linux Image
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,521
Thanks: 38
Thanked 335 Times in 308 Posts
man find:
Code:
find /path -type d -print

Sponsored Links
    #3  
Old Unix and Linux 02-23-2011
pointers pointers is offline
Registered User
 
Join Date: Apr 2010
Last Activity: 7 June 2012, 8:30 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you very much.

Regards,
Pointers
    #4  
Old Unix and Linux 02-23-2011
Ygor's Unix or Linux Image
Ygor Ygor is offline Forum Advisor  
Advisor
 
Join Date: Oct 2003
Last Activity: 15 May 2015, 11:55 AM EDT
Location: 54.23, -4.53
Posts: 1,801
Thanks: 1
Thanked 114 Times in 99 Posts
Tree...
Code:
find . -type d -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to list all the directories, sub directories in a mount along with size in ascending order? nmakkena Shell Programming and Scripting 4 10-27-2010 02:56 AM
How to get a list of files in a dir w/o sub-directories? aoussenko Shell Programming and Scripting 4 07-23-2010 09:19 AM
Copy Directories excluding files karthik82 UNIX for Dummies Questions & Answers 1 09-01-2009 05:31 AM
cp -r excluding certain directories? sarnobat Shell Programming and Scripting 2 01-13-2009 06:30 PM
List directories and files psalas UNIX for Dummies Questions & Answers 2 07-07-2008 12:28 PM



All times are GMT -4. The time now is 12:51 AM.