LoginSignup
17
19

More than 5 years have passed since last update.

unzip 覚書

Last updated at Posted at 2015-12-01

Usage:

unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]

list の中にあるファイル(xlist と exdir を除く)を展開する。
file[.zip] はワイルドカードを使用することができる。

unzip -Z

ZipInfo モードを実行する。

unzip -p

パイプへファイルを展開する。メッセージは表示しない。

unzip -l

下記の形式でファイルの一覧を表示する。

Archive:  test.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     2324  2015-12-02 02:18   unzip.md
---------                     -------
     2324                     1 file

unzip -f

既存のファイルを更新する。ファイルの作成は実行しない。

unzip -t

圧縮ファイルのデータに破損がないかテストする。

unzip -u

ファイルを更新する。必要があればファイルを作成する。

unzip -z

アーカイブコメントのみを表示する。

unzip -v

unzip のバージョン情報、または下記の形式でファイルの一覧を表示する。

Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    2324  Defl:N     1269  45% 2015-12-02 02:18 69bcf956  unzip.md
--------          -------  ---                            -------
    2324             1269  45%                            1 file

unzip -T

圧縮ファイルのタイムスタンプを更新する。

unzip -x

xlist に含まれるファイルを除外する。

unzip -d

exdir へファイルを展開する。

modifiers:

unzip -n

既存のファイルを上書きしない。

unzip -q

メッセージを表示しない。

unzip -o

プロンプトを表示せずにファイルを上書きする。

unzip -a

テキストファイルを自動変換する。

unzip -j

ディレクトリを作成しない。

unzip -aa

全ファイルをテキストとして扱う。

unzip -U

非アスキーユニコードをエスケープする。

unzip -UU

ユニコードフィールドを無視する。

unzip -C

大文字/小文字を区別しないファイル名

unzip -L

名前を小文字に変換する。

unzip -X

UID/GID 情報を復元する。

unzip -V

VMS バージョン番号を保持する。

unzip -K

setuid/setgid/tacky の権限を保持する。

unzip -M

コマンドの出力を more ページャへパイプする。

unzip -O CHARSET

DOS, Windows, OS/2 向け圧縮ファイルの文字エンコードを指定する。

unzip -I CHARSET

UNIX 向け圧縮ファイルと他の圧縮ファイルの文字エンコードを指定する。

17
19
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
17
19