count the number of file in directory linux code example
Example 1: count number of files in directory 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