Skip to content

Instantly share code, notes, and snippets.

@koryonik
Last active August 29, 2015 14:05
Show Gist options
  • Save koryonik/466f4680620d4dc9b417 to your computer and use it in GitHub Desktop.
Save koryonik/466f4680620d4dc9b417 to your computer and use it in GitHub Desktop.
Bash : List text files encoding in a directory tree

How to list text files and their encoding from a dir tree

Simple listing:

$ find . -type f -exec file -i {} \;"

Filter by encoding, eg. utf-8:

$ find . -type f -exec file -i {} \; | grep "charset=utf-8"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment