Actions
Feature #793
closed
DC
DC
Find File Extension Statistics For a Directory on FreeBSD
Feature #793:
Find File Extension Statistics For a Directory on FreeBSD
Description
I recently needed to find how many of each filetypes existed in a given directory. This is the command I used to get the desired data.
- Find filetype usage in a given directory:
find /path/to/data/ -type f -and -print | egrep -io '\.[^.]*$' | sort | uniq -c | sort -rn
Resources¶
Actions