find . -type d
can be used to find all directories below some start point. But it returns the current directory (.) too, which may be
.
Not only the recursion depth of find can be controlled by the -maxdepth parameter, the depth can also be limited from “top” using the corresponding -mindepth parameter. So what one actually needs is:
find
-maxdepth
-mindepth
find . -mindepth 1 -type d