Reputation: 1431
I'm using command from this topic to view all file extensions in directory and all subdirectories.
find . -type f -name '*.*' | sed 's|.*\.||' | sort -u
How do I can count number of appearance for each extension?
Like:
png: 140
Upvotes: 3
Views: 821
Reputation: 97247
Like this, using uniq
with the -c, --count
flag:
find . -type f -name '*.*' | sed 's|.*\.||' | sort | uniq -c
Upvotes: 5