How to find the number of files in directories?

Quags

Administrator
Staff member
One simple way in bash:

find | wc -l

or

for i in *; do if [ -d $i ]; then echo $i; find $i | wc -l; echo; fi; done
 
Top