Password protect zip file on mac OSX command line

October 25, 2020

Short reminder for myself on how to password protect a zip file on Mac OSX command line.

To zip and password protect a document on the command line

zip -er <zipname>.zip <file.txt or folder to zip>

This will prompt you for a password before zipping.

Darragh ORiordan

Hi! I'm Darragh ORiordan.

I live and work in Sydney, Australia enjoying the mountains and the ocean.

I build and support happy teams that create high quality software for the web.

Contact me on Twitter!

Get new writings, curated tech articles and coding tips!