Created
July 21, 2023 07:31
-
-
Save dbrugne/7300e4763c1b05448d28ce018f87006b to your computer and use it in GitHub Desktop.
Detect files encoding by CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install dep | |
npm i -g detect-file-encoding-and-language | |
# one file | |
dfeal myfile.txt | |
# file in folder | |
find ./myfolder -maxdepth 1 -type f -printf '%p' -exec dfeal {} \; | |
# recursive | |
find . -name "*.*" -type f -printf '%p' -exec dfeal {} \; | |
# recursive with pattern | |
find . -name "*.txt" -type f -printf '%p' -exec dfeal {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment