LoginSignup
0
0

More than 1 year has passed since last update.

ShiftJISファイル名が交じるガラケー時代のディレクトリ内のファイルの名前をUTF-8に一括変換

Last updated at Posted at 2022-03-26

環境

  • Amazon Linux
  • ガラケー時代にFTPでアップロードされた名前がShiftJISでエンコードされたファイルが多数
  • Amazon Linux では、 sudo yum install convmvNo packagesとなる

手順

  1. CentOS6 convmv で RPMパッケージを検索
  2. RPMをダウンロード
  3. RPMからインストール sudo yum install -y <ダウンロードしたRPM>.rpm
  4. cd <ファイルを一括変換するルートディレクトリー>
  5. 変換のテスト convmv -r -f cp932 -t utf-8 * ~/convmv.log
  6. 文字コードの想定があっているかチェック less ~convmv.log
  7. 変換 convmv --notest -r -f cp932 -t utf-8 * ~/convmv.log
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0