$ nkf --overwrite --oc=UTF-8 hoge.txt # BOMの削除 # hoge.txt: ASCII text $ nkf --overwrite --oc=UTF-8-BOM hoge.txt # BOMの追加 hoge.txt: UTF-8 Unicode (with BOM) text Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationWhat you can do with signing up