We are running solaris 2.9 on a Unix machine and I wanted to know how to get a total number of files in each directory and subdirectory of our server.
For example, if I am in a directory and underneath it are the subdirectories
I would like a command that will give me the name of each subdirectory (and including their subdirectories) with a total number of files in each so that it would read
collections 40 (number of files)
subdirectory X 30
subdirectory Y 50
subdirectory A 33
subdirectory B 22
Is there a command to do this or anything close?
Also is there a way to separate out types of files such as .html files from .jpg for example and subtotal each of those as well?