count files in all directories in path bash code example
Example 1: count files recursively linux
find DIR_NAME -type f | wc -l
Example 2: shell show number of files in each folder
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
find DIR_NAME -type f | wc -l
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr