bash find only list directories
find . -type d
Explanation:
- find
: Command used to search for files and directories recursively.
- .
: Represents the current directory. The search will start from this directory.
- -type d
: Specifies the type of the search. d
indicates directories. This option ensures that only directories will be listed in the output.