fileコマンドに--mine
オプション付けるだけで簡単に判定できる。
$ file --mime hoge.txt
hoge.txt: text/plain; charset=utf-8
More than 5 years have passed since last update.
fileコマンドに--mine
オプション付けるだけで簡単に判定できる。
$ file --mime hoge.txt
hoge.txt: text/plain; charset=utf-8
Register as a new user and use Qiita more conveniently