2

I've about 0.1 million images in a directory with all kinds of extensions (gif, jpeg, png, tiff, etc).

Now I want to find out how many types (of extensions) are there in the current directory, possibly with total number of images associated with them using a terminal command, something like this:

some-command

png  - 11010
jpeg - 1134
jpg  - 145
tiff - 555

P.S: I do not want to count files with specific extension but rather want to count types of extensions with their associated files.

galoget
  • 3,023
user_3pij
  • 135

1 Answers1

1

The duplicate candidate (deep down) has a close answer. Here it is modified:

find . -maxdepth 1 -type f | sed 's/.*\.//' | sort | uniq -c