Count files in a folder recursively

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

Comments