I know I can use the following to count the number of files in a repo:
git ls-files | wc -l
I just wonder if there is a similar method to count all folders (including hidden and subfolders).
I have tried:
ls -d /mnt/c/Users/USERNAME/GIT/REPO/*/ |wc -l
but the above only lists the folders ignoring subfolders and hidden folders.
CodePudding user response:
Maybe:
find /mnt/c/Users/USERNAME/GIT/REPO/ -type d | wc -l