To count the number of files in the current folder and in all of its subfolders (recursively): find . -type f | wc -l To count the number of files and folders in the current folder and in all of its subfolders (recursively): find . | wc -l
find . -type f | wc -l
find . | wc -l