How can I count how many folders (including subfolders) I have under an specific folder?
Asked
Active
Viewed 1.2k times
2 Answers
14
Use find to select the directories and wc to count them.
find <directory> -mindepth 1 -type d | wc -l
Dan Carley
- 26,127