macOS フォルダ内のファイルのエンコーディングを一覧表示する

フォルダ内にある Xcode 関連ファイル

  • h
  • m
  • mm
  • swift
  • txt
  • md
  • plist
  • strings

エンコーディング一覧を見たい場合は find コマンドでできる

# 現在のパスから開始する
$ find -E . -type f -iregex ".*\.(h|m|mm|swift|txt|md|plist|strings)" -exec file --mime {} \;

# 指定パスから開始する
$ find -E <PATH> -type f -iregex ".*\.(h|m|mm|swift|txt|md|plist|strings)" -exec file --mime {} \;