Is this your first visit? You may want to subscribe to the feed.

Creating encrypted Zip archives with OS X

Sadly, OS X doesn’t come with a way to create or open encrypted Zip archives, even from the command line (hopefully this will change with Leopard). The man pages for zip say that it supports it, but when you pass the -e or -P option, it complains:

zip error: Invalid command arguments (encryption not supported)

Fortunately, MacPorts (formerly DarwinPorts) to the rescue! There’s a version of the command line zip utility in MacPorts that works as advertised.

Install MacPorts, and install the new command line zip utility:

sudo port install zip

Move the old /usr/bin/zip out of the way, and then create encrypted Zip archives to your hearts content.

zip -re myarchive.zip mydir/
Enter password: ********
Code: mac, osx, security, zip Apr 08, 2007 ● updated Apr 08, 2007 2 comments

2 comments

  1. nice work! works for me…

    ASUS A8Fm Notebook OSX86 10.4.8

    thanks~

    dade murphy dade murphy October 02, 2007 at 01:04 PM
  2. Seems that zip -e in Leopard works fine as is, without Darwin ports.

    Jeff Jeff December 10, 2007 at 04:45 AM

Speak your mind:

*

*


* I hate spam and will never sell or publish your email address.

(You may use textile in your comments.)

Subscribe

Browse by Tag