Home Man
Today's Posts

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

List directories and sub directories recursively excluding files



Thread Tools Search this Thread
# 1  
Old 02-23-2011
List directories and sub directories recursively excluding files


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.

# 2  
Old 02-23-2011
man find:
find /path -type d -print

# 3  
Old 02-23-2011
Thank you very much.

# 4  
Old 02-23-2011
find . -type d -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'


« Previous Thread | Next 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
Find command excluding directories and some files jcdole Shell Programming and Scripting 5 05-14-2017 12:00 PM
Find all files in the current directory excluding hidden files and directories ksailesh1 UNIX for Advanced & Expert Users 7 02-03-2014 05:09 AM
List the directories, having given pattern in the directories name, sorted by creation date Siva SQL UNIX for Dummies Questions & Answers 2 05-05-2013 12:45 AM
How to list all the files, directories and sub-directories in the current path except one directory? Manjunath B Shell Programming and Scripting 7 09-13-2012 10:00 AM
Copy files/directories excluding multiple paterns ajayyadavmca Shell Programming and Scripting 0 04-25-2012 01:23 AM
Deleting all files recursively from directories while ignoring one file type pasc Shell Programming and Scripting 3 10-16-2011 08:19 AM
Recursively move directories along with files/specific files frintocf Shell Programming and Scripting 8 05-24-2011 07:04 AM
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
Copy Directories excluding files karthik82 UNIX for Dummies Questions & Answers 1 09-01-2009 05:31 AM

All times are GMT -4. The time now is 09:37 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password