count total files in folder linux recursively code example Example: how to count all files in a directory linux recursively find DIR_NAME -type f | wc -l