In order to count files recursively on Linux, you have to use the “find” command and pipe it with the “wc” command in order to count the number of files.
$ find <directory> -type f | wc -l
In order to count files recursively on Linux, you have to use the “find” command and pipe it with the “wc” command in order to count the number of files.
$ find <directory> -type f | wc -l