Results 21 to 22 of 22
Check this one out, I pondered a bit with a friend of me on this one, and we got a few solutions in the direction we wanted.
Its on my ...
- 07-29-2010 #21
Count the number of files in a directory, grouped by extension
Check this one out, I pondered a bit with a friend of me on this one, and we got a few solutions in the direction we wanted.
Its on my website as well: bran.name/dump/bash-build-aggregated-sorted-list-of-file-extensions-in-a-directory-and-count
This is the one I used eventually:
This one works aswell, its regex based, and thus I expect it to be slower compared to cut.Code:find . -type f -exec basename "{}" \; | rev | cut -d . -f1 | rev | sort | uniq -c | sort -rn
Code:find . -type f -exec basename "{}" \; | sed -e 's/.*\.//gi' | sort | uniq -c | sort -rn
- 07-29-2010 #22
This thread is 5 years old....locking.
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.


