Weil ich’s immer wieder suche 🙂
find . -type f | wc -l
Explanation:
find . -type f finds all files ( -type f ) in this ( . ) directory and in all sub directories, the filenames are then printed to standard out one per line.This is then piped | into wc (word count) the -l option tells wc to only count lines of its input.
Together they count all your files.
original von superuser.com