Recursively counting files in a Linux directory

You can use Linux find command with wc command to count the number of files recursively in a directory.

Example:

Create some files and directories:

Recursively count the number of files inside a directory:

Leave a Reply