LoginSignup
14
10

More than 5 years have passed since last update.

unzipに対応していないパスワードzipを解凍する

Last updated at Posted at 2018-10-11

普通のパスワードzipはunzipで解凍してくれますが、
圧縮の種類によっては以下のようにエラーが出るので、7zを入れてみました。

terminal
% unzip test.zip
Archive:  test.zip
   skipping: out/hoge.txt  unsupported compression method 99

前提条件

terminal
% sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G65

% brew --version
Homebrew 1.7.7
Homebrew/homebrew-core (git revision 9f5c; last commit 2018-10-10)
Homebrew/homebrew-cask (git revision 232f2c; last commit 2018-10-10)

7zをインストール

terminal
% brew install p7zip

解凍する方法

terminal
# -pとパスワードの間は空白を開けない
% 7z e -p{パスワード} {zipファイル名}.zip

オプション

7zと叩くと見ることができます。

terminal
% 7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64)

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]

<Commands>
  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths

...

雑感

変な圧縮形式を使わないに越したことはない。

14
10
1

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
14
10