I am able to list all the directories by
find ./ -type d
I attempted to list the contents of each directory and count the number of files i
This can also be done with looping over ls instead of find
for f in */; do echo "$f -> $(ls $f | wc -l)"; done
Explanation:
for f in */; - loop over all directories
for f in */;
do echo "$f -> - print out each directory name
do echo "$f ->
$(ls $f | wc -l) - call ls for this directory and count lines
$(ls $f | wc -l)