How to find number of files inside a folder (Linux)


To totally unlock this section you need to Log-in


Login

Scenario

You want to find out the number of files inside a folder. I didn’t want the folders to be included in the result.
Let's see how to do it with ls command which is not only downright inaccurate, it is also slower than what we are going to view.
We are going to view how to do it using find command which is extremely powerful once you know how to use it.

Solution

Executing the command below will print the number of files (excluding folders) in current [gs directory] (including all subdirectories):


To totally unlock this section you need to Log-in


Login

1 thought on “How to find number of files inside a folder (Linux)”

Comments are closed.