「分かりそう」で「分からない」でも「分かった」気になれるLinuxコマンド辞典イメージぴよ画像「分かりそう」で「分からない」でも「分かった」気になれるLinuxコマンド辞典

unzip

スポンサーリンク

何するコマンド?

zipファイル解凍するときに使うコマンド



書き方

unzip [オプション] [zipファイル名]



オプション

オプション説明
-x【ファイル名】指定ファイルは解凍しない
-d指定ディレクトリに解凍する
-Zzipファイルに含まれるファイルの一覧及び詳細情報を出力する
-A[OS/2, Unix DLL] print extended help for the DLL碵 programming interface (API).
-czipファイル中のファイルの内容を表示する。ただし実際の解凍はやらない
-fzipファイル内のファイルの方が新しい場合のみ解凍する
-lzipファイルに含まれるファイルの一覧を出力する
-pzipファイル中のファイルの内容を表示する。ただし実際の解凍はやらない
-tzipファイルが壊れていないかテストする
-Tzipファイルの更新日時を元ファイルの最新のファイル更新時刻に合わせる
-u存在しない、もしくは、すでにあるファイルより新しいファイルのみ解凍する
-vzipファイルに含まれるファイルの一覧及び詳細情報を出力する
-zzipファイル内のコメントのみ表示する
-aconvert text files.
-bzipファイル内のファイルをバイナリファイルとして扱う
-jjunk paths. The archive碵 directory structure is not recreated; all files are deposited in the extraction directory (by default, the current one).
-K[AtheOS, BeOS, Unix only] retain SUID/SGID/Tacky file attributes. Without this flag, these attribute bits are cleared for security reasons.
-Lconvert to lowercase any filename originating on an uppercase-only operating system or file system.
-Mpipe all output through an internal pager similar to the Unix more(1) command.
-n解凍したときにファイルの上書きはしない
-o解凍したときに、すべてのファイルを上書きする
-P 【パスワード】zipファイルの解凍パスワードを指定する
-q処理中のメッセージを表示しない
-s[OS/2, NT, MS-DOS] convert spaces in filenames to underscores.
-U(obsolete; to be removed in a future release) leave filenames uppercase if created under MS-DOS, VMS, etc. See -L above.

補足事項

単純に解凍したい場合は

unzip [zipファイル名]

でOKです。
例えば

unzip a.zip

のように打つと「a.zip」を解凍してくれます。
あとは必要に応じてオプションを指定してください。

スポンサーリンク


書籍画像