Answer the question
In order to leave comments, you need to log in
How to display the number of subdirectories in a directory?
Which command can display the number (number) of subdirectories in a directory?
Answer the question
In order to leave comments, you need to log in
ls -d /path/to/directory/*/ | wc -l
/path/to/directory - directory
*/ - indication to browse inside the directory
for example like this:
find /path/to/directory -maxdepth 1 -type d | wc -l
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question