![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| list the files but exclude the files in subdirectories | shyjuezy | UNIX for Dummies Questions & Answers | 8 | 10-15-2008 10:42 AM |
| get command to ftp subdirectories at once | lydiaEd | UNIX for Dummies Questions & Answers | 3 | 12-07-2007 12:06 AM |
| FTP command to search recursively in windows folder | lakshmis10 | Shell Programming and Scripting | 6 | 10-18-2007 02:09 AM |
| list largest files in a directory & its subdirectories | igidttam | UNIX for Dummies Questions & Answers | 6 | 09-25-2006 08:31 AM |
| List Files Recursively | roberthawke | UNIX for Dummies Questions & Answers | 9 | 06-24-2002 03:19 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
ls -dlRr I've tried different combinations of the ls command using the above-mentioned options but none of them are giving me the output I am looking for. Objective: To get a recursive listing of all subdirectories from a particular starting point. For example, if my starting point is directory A, and directory A contains subdirectories B, C, D, and each of the subdirectories contains a combination of directories and files called B1, C1, D1, etc., I want a recursive listing of the subdirectories contained, so the output will be something like A ./B ./B1 ./C1 etc. while excluding the list of the individual files. I tried doing a search for 'ls' in the forum but didn't see anything within the first two pages of the results that the search pulled. Help please! Thanks! - Hae --- Edit --- Nevermind! Found the answer at Recursive directory listing without listing files Last edited by HLee1981; 11-21-2005 at 03:08 PM. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
find /A -type d -ls
or find /A -type d -ls |awk '{print $10}' |
|
#3
|
|||
|
|||
|
Quote:
I tried it using a lowercase a after the /. Thanks. |
|
#4
|
||||
|
||||
|
what about
Code:
ls -Rl | grep "[a-z]:" | sed 's/://' |
|
#5
|
||||
|
||||
|
Yea, sorry about that - you probably don't have a /A - but I was more using your example
Quote:
|
||||
| Google The UNIX and Linux Forums |