You are here: >

Linux and Unix zipcloak command

zipcloak commandAbout zipcloak
zipcloak syntax
zipcloak examples
Related commands
Linux and Unix main page

About zipcloak

zipcloak encrypts files within an existing zip archive.

Encrypting Archives Using zipcloak

Archives created with the zip utility can be encrypted in two ways: by using zip's --encrypt option at archive time, or after the zipfile is created by using the zipcloak utility.

Let's say you have a zipfile which contains two files, file1 and file2, and you'd like to encrypt its contents so that only users who know the password can extract its contents. You can do this with zipcloak using this command:


zipcloak will prompt you for a password, and then ask you to confirm it:

Enter password: 
Verify password:

...if the passwords match, it will encrypt each file in the archive:

encrypting: file1
encrypting: file2

...and now, when you try to unzip the archive, it will prompt you for the password before allowing you to extract the files it contains:

[] file1 password:

Although it asks for "file1 password", you only need to enter the password once to decrypt and extract all of the files in the archive.

Removing Encryption From The Archive

Later, if you wish to remove the encryption from the zipfile, you can use the -d option of zipcloak, like this:

zipcloak -d

zipcloak will then ask you for the password that was used to encrypt the zipfile:

Enter password:

...and if you enter it correctly, zipcloak will remove the encryption from the files in the archive:

decrypting: file1
decrypting: file2

...and return you to the command prompt.

Outputting The Encrypted Archive To A New File

You also have the option of leaving the original archive unencrypted, and creating a new encrypted version of the archive instead. Let's say your original, unencrypted archive is named, and you want to create an encrypted version of the archive called, leaving the original file unchanged. You could use zipcloak's -O option to accomplish this. Run this command:

zipcloak -O

...and zipcloak will operate as usual, except that instead of encrypting the original archive, it will create a new, encrypted version of the archive named

Technical Description

zipcloak encrypts all unencrypted entries in the specified zipfile. This is the default action.

The -d option is used to decrypt encrypted entries in the zipfile.

Warning: zipcloak uses original zip encryption, which is considered weak in comparison to modern algorithms.

The encryption code of this program is not copyrighted and is in the public domain. It was originally written in Europe and can be freely distributed from any country including the United States. (Previously, if this program was imported into the U.S., it could not be re-exported from the U.S. to another country. See the file README.CR included in the source distribution for more information.) Otherwise, the Info-ZIP license applies.

Please note that archives larger than 2 gigabytes are not supported by zipcloak.

zipcloak syntax

zipcloak [-d] [-b path] [-h] [-v] [-L] zipfile


-b path

--temp-path path
Use the directory given by path for the temporary zip file.

Decrypt encrypted entries (copy if given wrong password).

Display a help message, and exit.

Display software licensing information, and exit.
-O newfile

--output-file newfile
Write output to new archive newfile, leaving original archive as is.

Operate quietly, suppressing some informational messages.

Display version information, and exit.

zipcloak examples


Encrypt zipcloak will prompt you to enter a password, then ask you to confirm it; if they match, it will encrypt the file so that it cannot be decrypted without that password.

zipcloak -O

Encrypt the contents of archive, but write the encrypted archive to a new file,, and leave unencrypted.

zipcloak -d

Remove any encryption previously placed on using zipcloak. You will be prompted for the password before it will remove the encryption.

unzip — List, test and extract compressed files in a zip archive.
zip — A compression and archiving utility.
zipnote — View, add, or modify a zip file's comments.
zipsplit — Split a single zip archive into a set of smaller zip files.