[Mac]How to set up password on ZIP file via terminal
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)
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%) _