number of files in a directory and subdirectories linux code example Example: count files recursively linux find DIR_NAME -type f | wc -l