Limiting to just files is a good idea, and if we employ our good friend awk it cuts the time down significantly.  This one should work for both OSX and Linux.<p>find . -type f -ls | awk '{print $7}' | cut -c -1 | sort | uniq -c