How can you list only directories from the current directory?

Answer:

To list the subdirectories in the current directory:

find . -maxdepth 1 -type d

To list the subdirectories and all their subdirectories:

find . -type d

First answer by Hvdeynde. Last edit by Hvdeynde. Contributor trust: 40 [recommend contributor recommended]. Question popularity: 20 [recommend question].