See below for a great shell command to get a listing of the count of files in all the folders in the current directory and below. It will produce an output similar to the following which can then be manipulated in a data-processing application:

1  ./example/dir1 
3  ./example/dir3/dir4/dir5
10 ./example/dir3/dir4/dir6
67 ./example/dir3/dir4/dir7


find . -type f -printf %h"\n" | sort | uniq -c

  • No comments found
Add comment

About Me

Josh Lyon Profile Picture

Name: Joshua Lyon
Location: Dallas, TX
E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
ProfilesGoogle, Twitter, GitHub
Other Sites:
     L2 Technology Services