Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
10
Help us understand the problem. What is going on with this article?
@pickles

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

More than 1 year has passed since last update.

普通のパスワード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

...

雑感

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

10
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
pickles
ぺちっとな

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
10
Help us understand the problem. What is going on with this article?