ZIPファイルの中身を見るには
ZIPファイルを解凍でなく中身だけを見たい場合がありますね。
Windowsでは、ZIPファイルは単にダブルクリックするだけで見れます。
しかし、Linuxではどうするのでしょうか・・・。
tar.gzならtarコマンドのtvzfオプションで見れますが・・・。
◆ 答え:
unzipコマンドのZオプションを使います。
・サンプル表示
$ unzip -Z file.zip Archive: file.zip 242 bytes 2 files -rw-rw-rw- 2.0 unx 66 t- defN 16-Jan-09 19:40 file.txt -rw-rw-rw- 2.0 unx 66 t- defN 16-Jan-09 19:41 file2.txt 2 files, 132 bytes uncompressed, 34 bytes compressed: 74.2%
もちろん、解凍は、オプションなしに『unzip file.zip』です。