Like find , listed in other answers, the best shells allow you to perform both recurvsive globs and glob filtering, so in zsh for example ...
ls -lad **/*(/)
... lists all directories, preserving all the required "-l" details that you would need to recreate using something like ...
find . -type d -exec ls -ld {} \;
(not as easy as other answers suggest)
The advantage of find is that it is more shell independent - more portable, even for calls to system() from a C / C ++ program, etc.
source share