linux count files in folder recursively code example
Example 1: count files recursively linux
find DIR_NAME -type f | wc -l
Example 2: bash count files in directory recursively matchingattern
ls -Uba1 | grep ^log | wc -l
find DIR_NAME -type f | wc -l
ls -Uba1 | grep ^log | wc -l