LoginSignup
1
0

More than 5 years have passed since last update.

Macでパスワード付きzipをコマンドだけで作成する

Last updated at Posted at 2018-06-15

すぐに忘れちゃうので備忘録として。

やりたいこと

Windowsでも問題なく開けるパスワード付きのzipをMacで作成したい。

環境

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.6
BuildVersion:   16G1408

必要なもの

pwgen

ランダムな文字列を生成してくれるツール

$ brew install pwgen

zip作成手順

1. パスワードを生成してコピーする

$ pwgen 8 1 | pbcopy

2. zipを作成する

$ zip -e [zipファイル名].zip [zipにしたいファイル1] [zipにしたいファイル2] ...
Enter password:    # 先程コピーしているパスワードをペースト
Verify password:   # 同上

参考

http://baqamore.hatenablog.com/entry/2017/03/31/042735
https://qiita.com/icedpasta1832/items/57d0d9805f04b6e79875

1
0
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
1
0