Contents
- UNIX
- Windows
- サーバ
- プログラミング言語
- データベース
- プロトコル
- サービス
- オープンソース
- 規格・技術
- アプリケーション
- PC
- DEVICE
- その他(未分類)
お問合せ:
メールフォーム
| コマンド | 説明 |
|---|---|
| zip | 複数ファイルを1ファイルにまとめてZIP圧縮します。ZIP は Windowsで一般的に利用されている圧縮形式で、パスワードを設定することも可能です。なお、圧縮率はそれほど高くありません。 |
| unzip | zip 圧縮されたファイルを解凍します。 |
% zip compress.zip file1 file2 file3
% zip compress.zip -r /path/to/dir
上記の場合、/path/to/dir のツリー構造を保ったまま圧縮されるので、解凍後は、/path/to/dir をたどっていかないと目的のファイルにたどり着けません。
/path/to/dir のツリー構造が不要な場合は以下のように一旦対象ディレクトリ直下まで cd してから zip します。
% cd /path/to; zip compress.zip -r dir
% zip compress.zip -r dir -e Enter password: Verify password:
% zip -P your_password compress.zip -r dir
% zip compress.zip -r dir -i \*.txt
% unzip -l archive.zip
Archive: archive.zip
Length Date Time Name
-------- ---- ---- ----
0 06-12-15 19:44 archive/
0 04-22-12 12:50 archive/dir/
614 10-06-05 22:18 archive/dir/file.txt
% unzip archive.zip
% unzip archive.zip archive/dir/file.txt Archive: archive.zip inflating: archive/dir/file.txt
% unzip archive.zip archive/dir/* Archive: archive.zip creating: archive/dir/file.txt