Kudos
Collect
Twiiter
Facebook
Share
개발의 'ㄱ'자라도 아는 날을 기대하며...

[Mac]How to set up password on ZIP file via terminal

Last updated 2 months ago
1 0 0 0

I just changed to Mac from PC and had to lock zip file with password. But I didn’t want to (^^;)download app just for setting up the passowrd. Here’s some tip. I found which you can set up a password to your zip file via terminal.

You don’t need to buy special app for zip file.

How to set up password on ZIP file ( ZIPCLOACK )

You can set up a password to your ZIP file by putting the following instruction in your terminal.

$ zipcloak [file path/file name.zip]

Note: You cna drag & drop if the file path is too long for you to type (see the below image)

Drag and drop the file path from finder
Drag and drop the file path from finder

For example, here’s test.zip file that I want to set up password (test.zip file has test.png files) and you can set up the password by putting the following instruction.

$ zipcloak ~/Desktop/test.zip 
Enter password: 🔑
Verify password: 🔑
encrypting: test.png
zipcloak warning: Local Entry CRC does not match CD: test.png
encrypting: __MACOSX/
encrypting: __MACOSX/._test.png
zipcloak warning: Local Entry CRC does not match CD: __MACOSX/._test.png
$ _

You won’t be see the actual password for security reason (you can ignore CRC related warning)

How to set up password while compressing the ZIPfile

$ zip -er [/path/file name] [/path/file name]

For example, instruction for compressiing test folder in Downloads into sample.zip will be the following.

$ zip -er sample.zip /Users/Desktop/test
Enter password: 🔑
Verify password: 🔑
  adding: Users/Desktop/test/ (stored 0%)
  adding: Users/Desktop/test/.DS_Store (deflated 96%)
  adding: Users/Desktop/test/test.png (deflated 3%)
$ _
Drag and drop the file from Finder to Terminal
Drag and drop the file from Finder to Terminal

안녕하세요?^^ 개발자라는 소리를 듣고 싶어 늦은 나이에 개발의 세계에 몸담게 된 Brad 라고 합니다. 아직 개발의 'ㄱ' 자도 모르지만, 개발을 배우면서 알게되는 것들을 림프에 정리해보려고 합니다. 저의 부족한 글이 누군가에게 조금이나마 도움이 되길 바랍니다.

 

Responses

Leave a response to @brad

Please sign in to comment.
Markdown is also available in comment.