Windowsで作ったzipをLinuxでunzipコマンドで解凍すると文字化けする

Windowsで作ったzipファイルをLinux(UTF-8環境)のunzipコマンドで解凍すると、日本語ファイル名が文字化けする。

$ unzip test.zip
Archive:  test.zip
  inflating: ?????
  inflating: ???????

unzipコマンドでcp932(Shift_JIS)のファイル名を解凍する

unzipコマンドで-Oオプションを指定するとファイル名のエンコードを指定できる。 Windowsのファイル名のエンコードはCP932なので-O cp932オプションを指定する。

$ unzip -O cp932 test.zip
Archive:  test.zip
  inflating: テスト.txt
  inflating: テスト2.txt