-   Linux - General (
-   -   Can ls recursively list only directories? (

Vosper 07-15-2005 09:06 PM

Can ls recursively list only directories?
Hi, I'm trying to figure out how to get ls to recursively list only directories. I know that -R is the recursion flag, but when I try "ls -R -d */" I only get one level below the current one, it doesn't go any further. Can anyone help me with this?

Thanks :)

crabboy 07-15-2005 10:53 PM

This should get you what you're looking for.


find . -type d

nick_th_fury 07-16-2005 01:17 AM

The command I use is tree.
You can read about it here:

or just 'man tree'

You can also pipe it's output into an ascii file like this
tree -d > list.txt
It's great for mapping directories.

ilnli 07-16-2005 04:57 AM

ls -R

All times are GMT -5. The time now is 04:11 PM.