Skip to main content

Reference to UNIX Commands and Options

This appendix contains reference information on every PKZIP command and option. For each command/option, the following information is provided:

Column

Purpose

Name/Description

Gives the name of the command/option and a brief description of what it does.

If a default value can be configured for the command/option, the word "Configurable" appears.

Value(s)

Lists any sub-options or values associated with the command/option and specifies any initial default values

Example usage

Shows examples of the command/option used in a PKZIP command line

Used with

Identifies the item as a command or an option: a listing of standalone in this column means that the item is a command.

For options, the column lists commands that the option can be used with.

If standalone is included with a list of commands, the item can be used as an option with any of the listed commands or can be used by itself as a command.

Information on each command/option follows:

Name/Description

Value(s)

Example usage

Used with

204

Turns on PKZIP for DOS 204g compatibility

Configurable

No sub-options.
---------------------
No default value.

pkzipc -add -204 save.zip *

add

add

Add files to an archive

Configurable

all - Compress and add files that are new to the archive as well as files that the archive already contains a (maybe newer) copy of

freshen - Add only files that the archive already contains an older copy of

update - Freshen files that are in the archive already and add any new ones
---------------------
Default = all

pkzipc -add save.zip *.doc

pkzipc -add=freshen save.zip *.doc

Outputs the archive to STDOUT instead of to a file:

pkzipc -add -noarchiveextension -silent=normal - *.txt

standalone

after

Process files that have the specified date or a later one

Configurable separately for add and extract operations.

Any date in format specified in Country-Settings or the locale option.

For example, the US date format is:

mmddyy
or
mmddyyyy

---------------------

No default value.

For compression:

pkzipc -add -after=09152003 save.zip *.doc

For extraction:

pkzipc -ext -after=09152003 save.zip *.doc

add, extract, delete, test, view, delete, console

altconfig

Creates or updates an alternate configuration file containing alternate, specified defaults when used with the configuration command; loads the specified alternate configuration file when used in a command line with any command other than configuration.

Path and name of alternate configuration file to create, update, or load

Create or update an alternate configuration file secure.xml with specified defaults. File is created if it does not exist already, or updated if it does:

pkzipc -config -altconfig=c:\secure.xml -cryptalgorithm=aes,256 -sign=all -certificate="John Public"

Use the default settings specified in alternate configuration file secure.xml when adding files to archive foo.zip:

pkzipc -add -altconfig=c:\secure.xml -passphrase foo.zip *.doc

All commands except listcertificates, listcryptalgorithms, listsfxtypes, license, and version

AltStream

Controls adding and extracting of Mac resource forks and NTFS alternate streams

Configurable

none - Alternate streams will be skipped.

native - Native alternate streams will be processed.

all - All alternate streams are processed. Non-native alternate streams are extracted using @RESOURCE-FORK@ or @STREAM@ in the file name.

--------------------------------------------

Defaults:

Add = none

Extract = native

Create an archive that includes alternate streams associated with *.txt files:

pkzipc -add -altstream=all test.zip *.txt

Extracts an archive and skips any alternate streams:

pkzipc -extract -altstream=none test.zip

add, extract

archivedate

Sets the modification date of the archive file.

Configurable

newest - Sets date of the archive to the date of the newest file in the archive

oldest - Sets date of the archive to the date of the oldest file in the archive

retain - When updating, keeps the date the archive had before it was updated. When creating a new archive, behaves the same as none

none - Sets the date of the archive to the date of its latest modification
---------------------
Default = none

pkzipc -add=update -archivedate=retain save.zip *.txt

add, delete, fix, header, comment, sfx

archiveeach

Creates a separate archive for each of multiple files specified in a single command line.

Can be used with archivetype and encode to create .tar.gz archives.

<destination> - Directory in which to create the archives

By default, archives are created in the current directory.

Creates a separate ZIP archive for each file in the current directory:

pkzipc -add -archiveeach *.*

Creates the archives in a specified destination:

pkzipc -add -archiveeach=C:\newzips *.*

Creates .tar.gz archives:

pkzipc -add -archiveeach -archivetype=tar -encode=gz C:\data*.*

add

archivetype

Explicitly specifies the type of archive to be acted on by the command. PKZIP works with ZIP archives by default or infers the archive type from the archive name. Use the archivetype option if PKZIP would assume or infer the wrong type.

If you wish to create an OpenPGP file, always use archivetype=pgp.

bzip2 - Specifies the Bzip2 archive type.*

zip - Specifies the .ZIP archive type. (default)

gzip - Specifies the GZIP archive type.*

pgp – Specifies the OpenPGP archive type.

tar - Specifies the TAR archive type.

uue - Specifies the UUENCODED archive type.*

xxe - Specifies an XXENCODED archive type.*

* These archive types can contain only one file. To use with multiple files, create an archive of one of the other archive types and use the encode option to encode this archive as the single-file archive type that you want.

Creates a TAR archive named myfile.foo.tar

pkzipc -add -archivetype=tar myfile.foo

Extracts from a BZIP2 archive on STDIN

pkzipc -extract -archivetype=bzip2 -noarchiveextension -silent=input -

Creates an OpenPGP archive encrypted for Bob Smith called myfile.pgp

pkzipc -add -archivetype=pgp -recipient="Bob Smith" myfile.pgp *.txt

add, extract, test, view

ascii

Set the internal attribute bit (ASCII/Binary) to ASCII.

Configurable

The file(s) or file pattern whose internal attribute bit you wish to set to ASCII; if no files are specified, PKZIP prompts for each file.
---------------------
No default value.

pkzipc -add -ascii=".txt" save.zip

pkzipc -add -ascii save.zip *

add

authenticate

Verifies that an archive is signed.

No sub-options.
---------------------
No default value.

Extracts the archive if it was signed

pkzipc -extract -authenticate signed.zip

extract

before

Process files that are older than a specified date.

Configurable separately for add and extract operations.

Any date in format specified in Country-Settings or the locale option.

For example, the US date format is one of the following:

mmddyy
mmddyyyy
---------------------
No default value

For compression:

pkzipc -add -before=09152003 save.zip *.doc

For extraction:

pkzipc -extract -bef=09152003 save.zip *.doc

add, extract, delete, test, view, print, console

binary

Treats the files to be added as binary files: sets the internal ASCII/Binary attribute bit of the files to binary.

Configurable

The file(s) or file pattern whose internal attribute bit you wish to set to binary; if no files are specified, PKZIP will prompt for each file.

pkzipc -add -binary=".exe" save.zip

pkzipc -add -binary save.zip

add

bzip2

Compress files using the BZIP2 method.

Files compressed with this method can be extracted with most varieties of PKZIP version 4.6 and later. Other .ZIP programs may not be able to extract files compressed with BZIP2.

No sub-options

Default compression level: 5

To compress files using the bzip2 algorithm and level 9 compression:

pkzipc -add -bzip2 -level=9 save.zip doc1.txt

To compress files using the default compression level (level 5):

pkzipc -add -bzip2 save.zip *.doc

add

cd

Encrypt file names and other metadata in a ZIP archive's central directory.

Requires that passphrase and or recipient options also be used. Uses strong encryption; does not work with traditional ZIP encryption.

Encrypting file names produces an archive that requires PKZIP or SecureZIP version 8.0 or later to open it.

Configurable

encrypt - Encrypt file names and the archive's central directory

normal - Do not encrypt file names; produces a normal ZIP file. Use to override a configured default setting that would otherwise encrypt file names.
---------------------

Default = encrypt

pkzipc -add -recipient="John Q. Public" -cd test.zip

pkzipc -add -recipient="John Q. Public" -cd=normal test.zip

pkzipc -add -passphrase=mysecret -cryptalgorithm=aes,256 -cd test.zip

add

certificate
Specifies the certificate to use to digitally sign a .ZIP file.

Configurable

<Name> - The common name of the subject of the certificate (that is, the cn field in a string representation of a certificate; this is the name as viewed in Outlook, Internet Explorer, or PKZIP for Windows); optionally, precede with:

cn=

If the certificate name contains a space, enclose the certificate name in quotation marks ("My Name").

<Email address> - The email address of the certificate (that is, the e field in a string representation of a certificate); optionally, precede with:

e=

The specified certificate must exist in the MY certificate store. If more than one certificate in the MY store has the specified name, the first certificate is used.

#<file name> - Specifies a PKCS#12 file that contains the certificate you want to use.

If the certificate's private key is not in the PKCS#12 file with the certificate, use the keyfile option to point to the separate file that contains the private key. If necessary, use the keypassphrase option to specify a passphrase to read the private key.

The certificate option can be used with the hash and sign options. By default, the .ZIP file is signed using the SHA-1 method, and both the central directory and files are signed.

pkzipc -add -certificate="John Smith" save.zip *.doc

pkzipc -add -certificate=cn="John Smith" save.zip *.doc

pkzipc -add -certificate=e= john.public@xyz.com save.zip *.doc

pkzipc -add -certificate=#mycert.p12 save.zip *.doc

add, delete, comment, sign, header

comment

Include a text comment for files within an archive file. When you run the command, PKZIP prompts you to enter the comment.

Configurable

all - All files already in the archive and all files added to or updated in the archive are commented

unchanged - Only files that are not changed in the archive are commented

add - Only newly added files and versions of files are commented

freshen - Only newly added versions of files already in the archive are commented

update - Only newly added files and versions of files already in the archive are commented (the opposite of unchanged)

none - No comments added

---------------------

Default = none

Value if used on command line without a sub-option = add

pkzipc -add -comment=all save.zip *.doc

add, standalone

configuration

Defines default values for PKZIP commands and options

<command or option> - Any configurable command or option

GUI - Invokes the configuration dialogs from the graphical PKZIP product. If specified, no other command line arguments are processed for configuration except more and silent, which can be set to govern the screen display of configuration settings.

silent - Suppresses list of configured settings that is ordinarily displayed after a command or option is configured.

---------------------

No default value.

pkzipc -config -extract=freshen

To see the current configuration values, type:

pkzipc -config

To open the Configuration dialogs of the GUI product for use in setting configuration defaults:

pkzipc -config=gui

Configures overwrite option and suppresses display of settings afterward:

pkzipc -config=silent -overwrite=never

Configures silent option and suppresses display of settings afterward:

pkzipc -config=silent -silent

standalone

console

Extracts files to the screen (standard output) instead of to disk

No sub-options.
---------------------
No default value.

pkzipc -console save.zip *.txt

standalone

crl

Warns if a certificate to be used for digital signing, encryption, or authentication is listed as revoked in an accessible CRL (certificate revocation list).

Use with strict option to prevent the certificate from being used.

Configurable


ocsp - Check the Online Certificate Status Protocol for revocation status

static - Check static CRL

none - Turn off CRL check
---------------------
No default value.

pkzipc -add -certificate="John Adams" -crl test.zip

pkzipc -add -recipient="John Q. Public" -crl -strict test.zip *.doc

pkzipc -extract -crl test.zip

pkzipc -extract -crl=static,ocsp signed.zip

add, comment, delete, extract, header, listfile, print, test, view

cryptalgorithm

Encrypts files using the specified encryption algorithm.

Configurable

The encryption algorithm to use. The listcryptalgorithms command lists the strong encryption algorithms available to you. Specify a strong encryption algorithm as it is listed in the output from the listcryptalgorithms command.

Default = Traditional PKWARE encryption

Value if used on command line without a sub-option = The strongest algorithm available on the system

Encrypt all files added with 128-bit AES using the specified passphrase:

pkzipc -add -cryptalgorithm=aes,128 -passphrase save.zip *.doc

Encrypt all files added with 3DES using the certificate named "My friend":

pkzipc -add -cryptalgorithm=3DES,168 -recipient="My friend" save.zip *.doc

Override a configured strong encryption setting to use traditional encryption just for the current command line:

pkzipc add -cryptalgorithm -passphrase save.zip *.doc

Create an OpenPGP archive called myfile.pgp using CAST5:

pkzipc -add -archivetype=pgp -cryptalg=cast5 -myfile.pgp *.txt

add

cryptoptions

Controls advanced encryption compatibility options.

Makes possible a choice of support for smart cards or for certain other target scenarios when doing certificate-based encryption. Only affects encryption done using the recipient option.

Configurable

FastAES – Enables the use of the fastest AES algorithm available, OpenSSL for AES over CryptoAPI. If FIPS 140 mode is enabled, this option is not effective.

smartcard - Supports certificate-based encryption for recipients using smart cards, but produces encrypted files that cannot be decrypted by older versions of PKZIP. Turn off to support certificate-based encryption for recipients using versions of PKZIP prior to 6.1 at cost of support for smart cards.

win2000 - Supports certificate-based encryption for recipients using smart cards or running on Windows NT or Windows 2000, but uses 3DES encryption to protect access to the key when encrypting with AES. Turn off to use no 3DES when encrypting with AES at cost of support for smart cards and recipients running Windows NT or Windows 2000.

---------------------

–smartcard and win2000 sub-options are on by default. FastAES is not.

To configure FastAES on :

pkzipc -config -cryptoptions=FastAES

To turn off smartcard in a command line:

pkzipc -add -cryptoptions=-smartcard -recipient="John Q. Public" test.zip

To configure both sub-options off:

pkzipc -config -cryptoptions= -smartcard,-win2000

To configure both sub-options on:

pkzipc -config -cryptoptions=smartcard,win2000

Add
Windows:
Extract, Test

dclimplode

Instructs PKZIP to use the data compression library compression scheme.

Configurable

ascii - use with ASCII files.

binary - use with BINARY or unknown data files.

Specify the size of the dictionary (1024, 2048, or 4096) after the type (ascii or binary). Use a comma to separate type and size. A larger size provides more compression.

---------------------

No default value

pkzipc -add -dclimplode=ascii,4096 text.zip *.txt

add

default

Reset the original defaults in the configuration file for all commands and options

No sub-options

No default value.

To reset all defaults:

pkzipc -default

standalone

deflate64

Compress files using the Deflate64 method.

Configurable

Files compressed with this method can be extracted by most versions 2.5x and later of PKZIP, but not all ZIP programs from other vendors can extract such files.

No sub-options.

No default value.

To compress files using Deflate64 algorithm and level 9 compression:

pkzipc -add -deflate64 -level=9 save.zip doc1.txt

To compress files using the normal, default compression level (level 5):

pkzipc -add -deflate64 save.zip *.doc

add

delete

Remove (delete) files from an archive

<files> -Names or file name pattern of files to delete

No default value.

For individual files:

pkzipc -delete save.zip doc1.txt

For a specific file pattern:

pkzipc -delete save.zip *.doc

standalone

directories

When adding, includes matching files in subdirectories and stores directory path names; when extracting, recreates saved directory paths.

Configurable

Using this command is the same as combining the path and recurse commands.

current - Store the path from the current directory.

root or full - Store the entire path beginning at the root of the drive; also referred to as "full" path.

specify or relative - Store path information relative to the specified directories, for their subdirectories

none - No path information stored

---------------------

Default = none when used with add; full when used with extract

Value if used on command line without a sub-option = current

Compression example (assumes you are in /wp):

pkzipc -add -directories=root save.zip docs*

The path stored is wp/docs/.

pkzipc -add -directories=current save.zip docs*

The path stored is: "docs/".

Extraction:

pkzipc -extract -directories save.zip *

Use the include option or place quotation marks around wildcard designations to bypass automatic wildcard expansion by the shell, which may restrict your pattern search. See "Using Wildcards with PKZIP on UNIX." 

add, extract

embedded

Suppresses prompt and, depending on the sub-option, extracts or does not extract the contents of a lone archive file embedded in another archive file of the type specified in the sub-option.

Configurable

arj - Extract the contents of lone archives embedded in ARJ archives, without prompting

-arj - Do not extract the contents of lone archives embedded in ARJ archives, and do not prompt

BinHex - Extract the contents of lone archives embedded in BinHex archives, without prompting

-BinHex - Do not extract the contents of lone archives embedded in BinHex archives, and do not prompt

bzip2 - Extract the contents of lone archives embedded in BZIP2 archives, without prompting

-bzip2 - Do not extract the contents of lone archives embedded in BZIP2 archives, and do not prompt

gzip - Extract the contents of lone archives embedded in GZIP archives, without prompting

-gzip - Do not extract the contents of lone archives embedded in GZIP archives, and do not prompt

lzh - Extract the contents of lone archives embedded in LZH archives, without prompting

-lzh - Do not extract the contents of lone archives embedded in LZH archives, and do not prompt

uue - Extract the contents of lone archives embedded in UUENCODED archives, without prompting

-uue - Do not extract the contents of lone archives embedded in UUENCODED archives, and do not prompt

xxe - Extract the contents of lone archives embedded in XXENCODED archives, without prompting

-xxe - Do not extract the contents of lone archives embedded in XXENCODED archives, and do not prompt

zip - Extract the contents of lone archives embedded in ZIP archives, without prompting

-zip - Do not extract the contents of lone archives embedded in ZIP archives, and do not prompt

---------------------

Disabled by default. When used, a sub-option must be set.

To extract an embedded archive from a ZIP file without prompting:

pkzipc -extract -embedded=zip outerarchive.zip

To suppress the prompt and not extract archives embedded in ZIP files:

pkzipc -extract -embedded=-zip outerarchive.zip

extract, console, print

encode

As an option, used with add, creates an archive and converts it to the archive type specified by the sub-option. As a standalone command, converts a specified existing archive.

Configurable

PKZIP creates two files when the encode option is invoked: an intermediate archive of the type specified for the add command (ZIP, by default), and an archive of the type specified for the encode option.


Use the movearchive option with encode to remove (delete) the intermediate archive.

bzip2 - Creates a BZIP2 file

gzip - Creates a GZIP file

uue - Creates a UUENCODED file

xxe - Creates an XXENCODED file

---------------------

Default value = uue

Value if used on command line without a sub-option = uue

Add files to save.zip and encode to UUE:

pkzipc -add -encode save.zip *

Add files to a TAR archive and encode to a GZIP archive:

pkzipc -add -encode=gz save.tar

Encode the archive as a GZIP archive and delete the intermediate archive created by the add command:

pkzipc -add -encode=gz -movearchive save.tar *

As a command, creates save.tar.gz from existing archive save.tar:

pkzipc -encode=gz save.tar

add

enterlicensekey

Prompts for a product license key

None

pkzipc -enterlicensekey

standalone

error

Designates warning conditions, by warning number, to treat as error condition 73 (Warning configured as an error)

Configurable

<warning number> - One or more warning numbers, separated by commas. To override a warning number configured for the option (and thus not treat that warning as an error), precede the number with a hyphen.

pkzipc -extract -error=42,43 files.zip

pkzipc -extract -error=42,-43 files.zip

add, extract, test, view

exclude

Exclude files from being compressed or extracted.

Configurable separately for add and extract operations.

You must specify a sub-option (for example, file pattern or list file name preceded by an appropriate list character "@") with the exclude option.

The file(s) or file pattern (for example, *.doc) being excluded.

No default value.

Compression example:

pkzipc -add -exclude=".doc" save.zip*

Extraction example:

pkzipc -extract -exclude=".txt" save.zip*

Setting exclude default:

pkzipc -config -exclude=".txt"*

When you use the exclude option with the configuration command, PKZIP prompts you to configure the exclude default for add and/or extract operations.

add, extract, delete, test, view, print, console

extract
Extracts files from an archive file

Configurable

all - Extracts all files in an archive file

freshen - Extracts only files in the archive that are newer versions of files that already exist in the target directory

update - Extracts files in the archive that are newer versions of files that already exist in the target directory or that do not exist in the target directory

Default = all

pkzipc -extract save.zip

pkzipc -extract=update save.zip

standalone

fast

Uses the Deflate algorithm and sets the level of compression to level 2 on a scale of 0 - 9. Files having the following extensions are added uncompressed: bz2, bzip2, cab, gz, gzip, rar, gif, jpeg, jpg, mp3, mpeg, mpg, sxw

Configurable

No sub-options.

No default value.

pkzipc -add -fast save.zip *.doc

pkzipc -config -fast

add

filetype

Processes files with the specified file type information in the .ZIP file.

Configurable separately for add and extract operations.

A hyphen before a filetype sub-option tells PKZIP to exclude the specified filetype(s) regardless of the default configuration setting (for example, -filetype=-hidden will exclude hidden files regardless of the default configuration setting).



block - Include/exclude block device files.

char - Include/exclude character device files.

directory - Retain directory information.

hidden - Include/exclude file names that have a dot in the first position of the file name (for example, .profile)

hlink - Include/exclude hard linked files. These are linked files that are not symbolic links. They are files with a link count > 1.

pipe - Include/exclude pipe files. These are files having a file mode starting with "p" (for example, prwxrw-rw-). Adds the pipe specification or definition (name, permissions, times, and so on), not pipe data.

regular - Include/exclude regular files.

slink - Include/exclude symbolic links. These are files having a file mode starting with "l" (for example, lrw-rw-rw-).

socket - Include/exclude sockets. These are the items that the ls -l command lists with an "s" at the beginning of the permissions

all - Include all of the above file types.

none - Exclude all of the file types above. Follow this sub-option with one or more file types to include just those types.

Default = regular

pkzipc -add -filetype=all save.zip

Include only pipe files:

pkzipc -add -filetype=none,pipe save.zip

add, extract

fipsmode

Causes SecureZIP to use only algorithms that comply with the FIPS 140 standard to perform cryptographic operations.

Use the commands listcryptalgorithms and listhashalgorithms with the fipsmode option to see lists of algorithms available with fipsmode.

Configurable

enabled - Turns the option on

disabled - Turns the option off (default)

Turns on fipsmode for the current command line:

pkzipc -add -recipient="John Public" -fipsmode save.zip *.doc

Overrides a configured default setting of fipsmode=enabled and turns off fipsmode for the current command line:

pkzipc -extract -fipsmode=disabled wedding_plans.zip *.*

Lists encryption algorithms available with fipsmode:

pkzipc -listcryptalgorithms -fipsmode

add, extract, test, listCryptAlg-orithms, listHashAlg-orithms
With file name-encrypted (FNE) archives, also applies to: comment, delete, header, view

fix

Attempts to repair a corrupt ZIP archive file

<file name> - The name of the ZIP archive to fix

No default value.

pkzipc -fix save.zip

standalone

ftp
Transfers an archive using FTP

Configurable

Syntax (optional fields in brackets):

-ftp= [username[:pwd [:account]]@]server/path

where:

username (optional) is the user account with which to log in if the FTP server requires a login

passphrase (optional) is the passphrase associated with the user account. Colons are not allowed in the passphrase.

account (optional) is for use only with FTP servers that require additional authentication. Do not specify the account for servers that do not require it.

server is the FTP server name

path is the path to the destination of the transferred file on the server. Use two slashes (server//path) to specify a full path; use one slash (server/path) to specify a path relative to the login destination directory.

pkzipc -add -ftp=serv/home/thomas mydocs.zip *.doc

pkzipc -add -ftp=me@serv/home/thomas mydocs.zip *.doc

Standalone:

pkzipc -ftp=serve/home/thomas mydocs.zip

add, delete, header, comment, standalone

groupadd

Creates a new group or adds items to the existing group

<group name>[,<recipient 1>][,<recipient 2>]...

pkzipc -groupadd =Test,0x1234567812345678,user1@mycompany.com

Standalone

groupdesc

Provides description for the group, can only be used with –groupadd command

<group description>

pkzipc -groupadd=Test,0x1234567812345678,user1@mycompany.com

-groupdesc="My test group"

groupadd

groupdetail

Lists detail information about group(s)

[<group name>]

List detailed information about group 'Test':

pkzipc -groupdetail=Test

List detailed information about all groups:

pkzipc -groupdetail

Standalone

groupfile

Specifies the alternative name of the group file to use

Configurable


pkzipc -groupadd =Test,0x1234567812345678,user1@mycompany.com

-groupfile=<path>"my group file.xml"

pkzipc -add -groupfile=<path>"my group file.xml" -recipient=group=Test test.zip *.txt*

groupadd

grouplist

Lists names and description of all groups


pkzipc -grouplist

Standalone

groupremove

Removes items from a group or an entire group

<group name>[,<recipient 1>][,<recipient 2>]...

Remove selected recipient(s) from the group:

pkzipc -groupremove =Test,0x1234567812345678

Remove entire group:

pkzipc -groupremove=Test

Standalone

hash

Sets the hashing algorithm to use when signing an archive. Use listhashalgorithms to list hashing algorithms available.

Configurable

This option requires SecureZIP.

The hashing algorithm to use, as listed in the output from the listhashalgorithms command.

Default = sha1

pkzipc -add -certificate="John Smith" -hash=sha1 save.zip *.doc

add, delete, comment, header

header

Creates a comment for a ZIP archive file in the header area of the file

Configurable

<file name> - The file that contains the header comment. The file name must be prefixed with the ListChar symbol ("@" by default) to distinguish it from the other sub-option

<comment> - The literal comment to be used

-------------------------

No default value.

To include literal text:

pkzipc -add -header save.zip *.doc

PKZIP prompts for the header text

To include an existing file:

pkzipc -add -header=@text.doc save.zip *.doc

add
standalone

help

Displays help screen for PKZIP

<command or option> - Any command or option for which help is desired.

No default value.

pkzipc -help

Display help for the add command:

pkzipc -help=add

standalone

id

Preserve the user ID (UID) and/or group ID (GID) on extraction.

Configurable

The user who extracts files with preserved UID and GID information must have the same UID as is archived in the .ZIP file or root (superuser) file privileges.

userid - retain the user ID on extraction.

groupid - retain the group ID on extraction.

all - retain both the user ID and group ID on extraction.

none - retain neither the user ID or group ID on extraction.

No default value.

pkzipc -extract -id=userid save.zip

extract

include

Include files to compress or extract.

Configurable separately for add and extract operations.

You must specify a sub-option (for example, file pattern or list file name preceded by an appropriate list character "@") with the include option.

The file(s) or file pattern (for example, *.doc) being included.

No default value.

Compress only .doc files:

pkzipc -add -include="*.doc" save.zip

Configure default behavior to always include .txt files in folders accessed by the command line even if the command line does not explicitly include them, as long as the command line does not explicitly exclude them:

pkzipc -config -include="*.txt"

When you use the include option with the configuration command, PKZIP prompts you to specify whether to configure the option for add and/or extract operations.

add, extract, delete, test, view, print, console

jobid

Specifies a job ID with which to prefix PKZIP log entries in the system logging facility

<ID> - The job ID to use

pkzipc -add -logerror=syslog -logoptions=start -jobid=my_id2 mytestlog.zip bookmark.htm

All commands

keyfile

Specifies a file containing the private key for the certificate specified by the certificate option. The option is most useful when using SSL server certificates, which often have the private key and certificate in separate files.

Configurable

<file name> - The name and location of the file

pkzipc -add -certificate=#mycert.pem -keyfile=mykey.key save.zip *.doc

add, extract, test, sign, view

keypassphrase

Specifies the passphrase used to decrypt private key information. This can be the passphrase used for your certificate store, for a PKCS#12 file (specified with the certificate option), or a key file specified with the keyfile option.

Configurable

<passphrase> - The passphrase, in quotes

pkzipc -add -certificate=#mycert.p12 -keypassphrase="my password" save.zip *.doc

pkzipc -add -certificate=#mycert.pem -keyfile=mykey.key -keypassphrase="my password" save.zip *.doc

add, extract, test, sign, view

keyserver

Defines a connection to an OpenPGP Key Server that will be used to find keys

Configurable

This option is only available in versions that have certificate-based strong encryption.

Syntax is

[http://][https://] [[userid:password@]server[:port]

pkzipc -config -keyserver=http://user:pass@192.168.0.1

pkzipc -config -keyserver=http://user:pass@192.168.0.1:11371

 config

larger

Process only those files whose size is greater than (in bytes) or equal to a specified file size.

Configurable separately for add and extract operations.

Numerical value that indicates a minimum desired file size.

Acceptable notation:

K - 1024B

M - 1024K

G - 1024M

T - 1024G

No default value.

Add only files that are at least 5000 bytes in size:

pkzipc -add -larger=5000 save.zip *

add, extract, test, view, delete, print console

ldap
Specifies an LDAP directory for PKZIP to search before looking in local stores for certificates containing public keys for certificate-based encryption (see the recipient option).

The ldap option must appear before the recipient option when the two options are used together in a command line.

Configurable

The ldap option is available only with SecureZIP.

Syntax (optional fields in brackets):

-ldap=[[userid :passphrase@]server[:port]] [,ssl] /ldap_base

where:

userid (optional) is the user account with which to log in if the LDAP server requires a login

passphrase (optional) is the passphrase associated with the user account

server (optional) is the LDAP server name or TCP/IP address

port (optional) is the TCP/IP port to use. The default is 389 if no port is specified.

referrals (optional) controls how LDAP referrals work. By default, the search will honor referrals set up on the LDAP server. Use -referrals to disable.

ldap_base (required) is the name of the entry that PKZIP should use as the base or root of the LDAP search for certificates, analogous to a root folder or directory in a file system

The query string format for ldap_base can vary between LDAP implementations. Check with your LDAP or network administrator for the format to use.

See "Accessing Recipients in an LDAP Directory."

pkzipc -add -ldap=john_p:mysecret @192.172.0.1 :389/cn=users,dc=xyz, dc=com -recipient="Mary Samplename" save.zip *.doc

pkzipc -add -ldap=/cn=users,dc=xyz, dc=com -recipient=e= mary.samplename@xyz.com save.zip *.doc

add

level

Sets the level of compression.

See also the options store, speed, fast, normal, and maximum, which provide non-numeric names for various compression settings with (except store) the Deflate compression method.

Configurable

Any digit from 0 through 9, with 0 being no compression at the fastest speed, and 9 being the most compression at the slowest speed.

Default = level 5 (normal)

pkzipc -add -level=9 save.zip *.doc

add

license

Displays the product license information for PKZIP

No sub-options.

No default value.

pkzipc -license

standalone

links
Specify that linked files be followed or preserved in a .ZIP archive.

Configurable

Following a link results in a larger .ZIP file size since two copies of file data are compressed as though each link is a separate file.

hlink - Hard links are followed (stored) rather than preserved.

-hlink - Hard links are preserved

slink - Symbolic links are followed (stored) rather than preserved.

-slink - Symbolic links are preserved

all - Symbolic and hard links are followed rather than preserved.

none - Symbolic and hard links are preserved.

Default = none

Compress regular and hard linked files and duplicate link and file data for each hard linked file added:

pkzipc -add -links=hlink save.zip

add

listcertificates

Lists digital certificates in a certificate store.

This will display both X.509 certificates and OpenPGP keys. The OpenPGP keys will be listed with (OpenPGP) following the name. If an OpenPGP key contains more than one userid, multiple certificates will display.

my - Lists personal certificates in the MY store

addressbook - Lists public certificates in the AddressBook store

ca - Lists intermediate, certificate authority certificates in the CA store

root - Lists trusted certificates in the Root store

Default = my

pkzipc -listcertificates

pkzipc -listcertificates=addressbook

standalone

listchar

Set the list character to the specified ASCII character. Prefixing a file name with the list character identifies it as a list file.

Configurable

Any character in the printable ASCII range. Must not be the same as OptionChar and must not be "-".

default = @

pkzipc -config -listchar=+

All commands except list certificates, list cryptalgo rithms, listsfxtypes, license, and version

listcryptalgorithms

Displays a list of the strong encryption algorithms available for use with the cryptalgorithm option. With fipsmode on, it lists only FIPS-validated algorithms.

When OpenPGP is enabled through configuration or –archivetype=pgp, CAST,128 will also be listed.

This option is only available in versions that have strong encryption.

None

pkzipc -listcryptalgorithms

standalone

listfile

Generates a text file that lists the files to be added to or extracted from an archive. The option causes a list file to be created instead of actually adding or extracting files.

Requires a name for the list file

No default value.

Create a list file of files that the command line minus the listfile option would add to myarchive.zip:

pkzipc -add=update -listfile=mylist.txt myarchive.zip *

Generate a list file that lists all files, with any saved path information, that the command line minus the listfile option would extract from the save.zip archive

pkzipc -extract -listfile=list.txt save.zip

add, extract

listhashalgorithms

Displays a list of the hash algorithms available to the hash option. With fipsmode on, it lists only FIPS-validated algorithms.

None

pkzipc -listhashalgorithms

standalone

listsfxtypes

Display a list of the types of SFX files that can be created with PKZIP

No sub-options.

No default value.

pkzipc -listsfxtypes

standalone

listsponsors

Available only for SecureZIP Partner
Lists PKWARE PartnerLink sponsors defined to the system

No sub-options.

No default value.

pkzipr -listsponsors

standalone

locale

Sets the default PKZIP time and date settings to match your system time and date formats. When disabled, PKZIP uses a 12-hour time format and a date format of MMDDYY.

Configurable

enable - Turns the option on

disable - Turns the option off

Default = enable

Configure the option to be off by default:

pkzipc -config -locale=disable

Turn the option off for the current command line

pkzipc -add -locale=disable test.zip *.doc

All commands except listcertificates, listcryptalgorithms, listsfxtypes, license, and version

log

Causes PKZIP to log normal messages and specifies where to write them. Also causes SNMP traps for normal operations to be sent.

Configurable

stdout - (Default) Writes messages to standard output

stderr - Writes messages to standard error

syslog - Writes messages to the system logging facility

<file name> - Writes messages to a specified file. Each command line logged overwrites the file.

snmp - If SnmpTrapHost is set, sends an SNMP trap for each normal operation that generates a message to STDOUT

Default = stdout

pkzipc -add -log=syslog -logoptions=start -jobid=my_id2 mytestlog.zip bookmark.htm

Sends SNMP traps:

pkzipc -add -log=snmp -logoptions=start -jobid=my_id2 -snmptraphost=nmsnode1 mytestlog.zip bookmark.htm

All commands

logaudit

Causes PKZIP to log audit messages and specifies where to log them.

Configurable

<file name> - Writes messages to specified file.

pkzipc -add -jobid="Backup C:" -dir -logAudit=logfile.json

add

logerror

Causes PKZIP to log messages for errors and warnings and specifies where to write them. Also causes SNMP traps to be sent for error and warning conditions.

Configurable

stdout - Writes messages to standard output

stderr - (Default) Writes messages to standard error

syslog - Writes messages to the system logging facility

<file name> - Writes messages to a specified file. Each command line logged overwrites the file.

snmp - If SnmpTrapHost is set, sends an SNMP trap for each error or warning condition

Default = stderr

pkzipc -add -logerror=syslog -logoptions=start -jobid=my_id2 mytestlog.zip bookmark.htm

Sends SNMP traps:

pkzipc -add -logerror=snmp -logoptions=start -jobid=my_id2 -snmptraphost=nmsnode1 mytestlog.zip bookmark.htm

All commands

logoptions

Determines whether an entry appears in the system logging facility when PKZIP starts and/or stops, regardless of log or logerror settings. Also sends SNMP traps for these events if snmptraphost is set.

Configurable

none - No extra messages will be logged.

start - Puts an entry in the system logging facility each time PKZIP starts. The entry contains the current command line.

Also sends an SNMP trap if snmptraphost is set.

stop - Puts an entry in the system logging facility each time PKZIP stops.

Also sends an SNMP trap if snmptraphost is set.

security - Causes additional security information to be logged.

all - includes Start, Stop and Security entries in system log.

pkzipc -add -log=syslog -logoptions=start,stop -jobid=my_id2 mytestlog.zip bookmark.htm

pkzipc -add -logoptions=start,stop -snmptraphost=nmsnode1 mytestlog.zip bookmark.htm

All commands

lowercase

Extracts file name(s) in lower case regardless of how it was originally archived.

Configurable

disable – Do not change the case of extracted files.

archive - extracts file name(s) such that only path information stored in the archive becomes lower case.

full - Extracts file name(s) such that all path information stored in the archive becomes lower case, and any extract path specified on the command line also becomes lower case.

---------------------

default = archive.

pkzipc -extract -lowercase=full save.zip MixedCaseExtract/

Extracts all files from save.zip using lower case letters to a directory named mixedcaseextract. That directory's name will have lower case letters.

pkzipc -extract –lowercase=archive save.zip MixedCaseExtract/

Extracts all files from save.zip using lower case letters to a directory named MixedCaseExtract. That directory's name will have mixed case letters.

extract

lzma

Compress files using the LZMA method.

Configurable

Files compressed with this method can be extracted by PKZIP versions 12.3 and later, but not all ZIP programs from other vendors can extract such files.

No sub-options.
---------------------
No default value.

pkzipc -add -lzma save.zip doc1.txt

add

mailBCC

Specifies the email address of a recipient to be blind-copied (that is, sent a copy without appearing in any list of recipients)

Configurable

<email address> - The email address of the recipient

<file name> - Name of a file that contains a list of email addresses, one address to a line

The file must be prefixed with the list character (@ by default) defined with the listchar option, to identify the file as a list file.

pkzipc -add -mailTo=john.public@abc.com -mailTo=jane.doe@abc.com -mailSubject="Latest sales" -mailBody="Here are the figures I promised" -mailCC=rich.smith@abc .com -mailBCC=bill.cody @abc.com data.zip *.doc

add, delete, header, comment, mailto

mailBody

Specifies text for the message body of a message

Configurable

<body text> - The message body text to use, set off by quotes

<file name> - Name of a file that contains the text to use for the message body. The file name must be prefixed with the list character (@ by default) defined with the listchar option.

pkzipc -add -mailTo=john.public@abc.com -mailSubject="Latest sales" -mailBody="Here are the figures I promised" data.zip *.doc

pkzipc -add -mailTo=john.public@abc.com -mailSubject=@subject_text.txt -mailBody=@body_text.txt data.zip *.doc

add, delete, header, comment, mailto

mailCC

Specifies the email address of a recipient to receive a copy of the message. Use this option once for each recipient to receive a copy.

Configurable

<email address> - The email address of the recipient

<file name> - Name of a file that contains a list of email addresses, one address to a line. The file name must be prefixed with the list character (@ by default) defined with the listchar option,

pkzipc -add -mailTo=john.public@abc.com -mailSubject="Your data" -mailCC=rich.smith@abc.com data.zip *.doc

pkzipc -add -mailTo=john.public@abc.com -mailSubject="Your data" -mailCC=@listfile.txt data.zip *.doc

add, delete, header, comment, mailto

mailFrom

Specifies the email address of the sender of the message. The address must be one that the SMTP server allows.

This option and the mailTo and mailServer options are required: They must be configured or explicitly appear on the command line to send mail.

Configurable

<email address> - The email address of the sender

pkzipc -add -mailTo=john.public@abc.com -mailFrom=jane.doe@abc.com -mailSubject="Your data" -mailCC=rich.smith@abc.com data.zip *.doc

add, delete, header, comment, mailto

mailOptions
For use with the mail… options: Hides names in the TO list of a mail message; includes instructions on how to unzip

Configurable

each - Causes each mailTo recipient to receive the message with only his own name appearing in the TO list. Each mailCC and mailBCC recipient receives a copy of each message to each mailTo recipient.

undisclosed - Works just like the each sub-option except that the message that each recipient receives displays Undisclosed in the TO field instead of the recipient's name. Undisclosed is faster than each, which must get recipient names.

instructions - Causes PKZIP to include a small, additional attachment explaining how to unzip a ZIP file

all - Turns on both of the sub-options described above

none - (Default) Turns off any sub-options

Default = none

pkzipc -add -mailTo=john.public@abc.com -mailTo=jane.doe@abc.com -mailOptions=each -mailSubject="Your data" -mailCC=rich.smith@abc.com data.zip *.doc

Uses default value:

pkzipc -add -mailTo=john.public@abc.com -mailTo=jane.doe@abc.com -mailOptions -mailSubject="Your data" -mailCC=rich.smith@abc.com data.zip *.doc

add, delete, header, comment, mailto

mailReplyTo

Specifies an alternate email address for recipients to use instead of the mailFrom address to reply to the message

Configurable

<email address> - The email address to use for replies

pkzipc -add -mailTo=john.public@abc.com -mailFrom=jane.doe @xyz.com -mailSubject="Plans" -mailreplyTo=jane.doe@myplace.net plans.zip *.doc

add, delete, header, comment, mailto

mailServer

Specifies the name or IP address of the SMTP server.

This option and the mailTo and mailFrom options are required: They must be configured or explicitly appear on the command line to send mail.

Configurable

<server> - The name or IP address of the server, for example, mail01, or mail.abc.com

<user:pass@server> - Tells PKZIP to try plain-text authentication to connect to the server, using the supplied user name and passphrase. The user name and passphrase are both optional. For example, either of these works:

mailserver=user@mail.abc.com

Note the colon prefixing the passphrase:

mailserver=:pass@mail.abc.com

pkzipc -add -mailto=tom.jefferson@wash.com -mailfrom=sam.adams@wash.com -mailserver=mail01 files.zip *.doc

pkzipc -add -mailto=tom.jefferson@wash.com -mailfrom=sam.adams@wash.com -mailserver=sama@mail01 files.zip *.doc

pkzipc -add -mailto=tom.jefferson@wash.com -mailfrom=sam.adams@wash.com -mailserver=sama:passwd @mail01 files.zip *.doc

add, delete, header, comment, mailto

mailSubject

Specifies text for the Subject line of an email message header

If this option is omitted, the text Sending <archive name> is used.

Configurable

<subject text> - The message subject text to use, set off by quotes

<file name> - A file name that contains the message subject text. The file must be prefixed with the list character (@ by default) defined with the listchar option.

pkzipc -add -mailTo=john.public@abc.com -mailSubject="Your data" -mailCC=rich.smith@abc.com -mailOptions =instructions data.zip *.doc

pkzipc -add -mailTo=john.public@abc.com -mailSubject=@subject_text.txt -mailBody=@body_text.txt data.zip *.doc

add, delete, header, comment, mailto

mailTo

Specifies the email address of a recipient. Use multiple times to specify multiple recipients.

Use with cryptalgorithm to apply certificate-based encryption to attached files for all recipients.

This option and the mailFrom and mailServer options are required: Values for these options must be configured or be specified on the command line to send mail.

<email address> - The email address of the recipient

<file name> - A file name that contains a list of email addresses, one address to a line.

The file must be prefixed with the list character (@ by default) defined with the listchar option.

recipient - Uses email addresses associated with certificates configured for the recipient option (as distinct from the recipient sub-option of mailTo). This sub-option can be used only when mailTo is used as an option with another command such as add.

As a command:

pkzipc -mailto=tom.jefferson@wash.com -mailfrom=sam.adams@wash.com files.zip

As an option:

pkzipc -add -mailto=tom.jefferson@wash.com -mailto=ulysses.grant@wash.com -mailfrom=sam.adams@wash.com files.zip *.doc

pkzipc -add -mailto=@to_list.txt -mailfrom=sam.adams@wash.com files.zip *.doc

pkzipc -add -mailto=recipient -mailserver=mail01 -mailfrom=sam.adams@wash.com files.zip *.doc

Encrypts files:

pkzipc -add -recipient=tom.jefferson @wash.com -recipient=sam.adams @wash.com -mailTo=recipient -mailserver=mail01 -mailfrom=sam.adams @wash.com files.zip *.doc

add, del, header, comment,
standalone

mask

Specifies a permissions mask for files added or extracted. When extracting, you can use the option with the permission option to explicitly strip permissions that would otherwise be set.

Configurable

<octal value> - A value in octal which represents the permissions which should NOT be restored. For example, to prevent files from being extracted with any execute permissions, specify a mask value of 111.

pkzipc -extract -mask=111 save.zip

add, extract

maximum

Uses the Deflate compression method and sets the level of compression to level 9, the highest level on a 0 - 9 scale, but gives the lowest speed

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -maximum save.zip *.doc

pkzipc -config -maximum

add

messagedigest

Display one or more message digests for files inside an archive.

All – Calculates and displays the message digest for all of the algorithms.

None – Don't display any message digests or checksums. This is useful for displaying only one.

CRC32 – Calculates and displays CRC32 checksum

MD5 – Calculates and displays MD5 message digest.

SHA1 – Calculates and displays SHA-1 message digest.

SHA256 – Calculates and displays SHA-256 message digest.

SHA384 – Calculates and displays SHA-384 message digest.

SHA512 – Calculates and displays SHA-512 message digest.

Prefix an algorithm with - to indicate it should not be used

---------------------

Default = all

Shows the message digest using all available hash algorithms for all files inside archive.zip

pkzipc -messagedigest archive.zip

Shows the message digest using all available hash algorithms for only file.doc inside archive.zip

pkzipc -messagedigest archive.zip file.doc

Uses the sha256sum program to verify that file.doc inside archive.zip is the same as file.doc in the current directory.

pkzipc -messagedigest =none,sha256 -silent=banner archive.zip file.doc | sha256sum --check

Standalone

more

Pauses after one screen of output and prompts to continue.

Configurable

The number of rows of information you want to define as a screen

---------------------

Default = one screen of information

pkzipc -view -more=22 save.zip

pkzipc -config -more

All commands

move

Removes (deletes) files from the source drive after adding them to an archive.

No sub-options.

---------------------

No default value.

pkzipc -add -move save.zip *.doc

add

movearchive

Deletes an archive that is created only as an intermediate archive—for example, to be converted by the encode option to an archive of a different type, or to be transferred by FTP.

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -encode=gzip -movearchive myfiles.tar

add

mt

Use multiple threads when creating archive.

The number of threads to use, defaults to the number of processing cores on the system.

Create test.zip using multiple threads.

pkzipc -add -mt test.zip *.doc

Create test.zip using up to 3 threads.

pkzipc -add -mt=3 test.zip *.doc

add

namesfx

Specify a file name when converting to a self-extracting file.

<file name> - File name for the SFX file

---------------------

No default value.

pkzipc -sfx -namesfx=test.exe docs.zip

sfx

newer

Selects files that are no older than a specified interval

Configurable separately for add and extract operations

With a time unit of days, the interval is measured from the beginning of the current day. With time units of hours, minutes, or seconds, the interval is measured from the current system time.


To specify an explicit date, see after.

<numeric value> A number of days, hours, minutes, or seconds defining the interval, plus a suffix identifying the kind of units used:

Suffixes:

d - Days (default)
h
- Hours
m
- Minutes
s
- Seconds

---------------------

No default value.

Add files no older than 24 hours:

pkzipc -add -newer=24h save.zip *

Add files no older than five days:

pkzipc -add -newer=5d save.zip *

pkzipc -add -newer=5 save.zip *

add, extract, test, view, print, console

noarchiveextension
Suppresses adding a file name extension to the specified archive file name

Configurable

This option is identical to nozipextension, which is now deprecated.

No sub-options.

---------------------

No default value.

pkzipc -add -noarchiveextension file.ibm *.doc

All commands except listcertificates, listcryptalgorithms, listsfxtypes, license, and version

noextended

Suppress the storage of extended attribute information (excluding file permission attributes

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -noextended save.zip *

add

nofix

Suppress the attempt to fix any problems PKZIP encounters in extracting from an archive

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -nofix save.zip *.doc

All commands except listcertificates, listcryptalgorithms, listsfxtypes, license, and version

normal

Uses the Deflate algorithm and sets the level of compression to 5 (normal) on a scale of 0 - 9 for a balance of compression and speed. Unlike with the fast option, all files are compressed.

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -normal save.zip

pkzipc -config -normal

add

nosmartcard

This option is deprecated. Instead of setting nosmartcard, turn off the smartcard sub-option of cryptoptions.

Turns off smart card compatibility when set in conjunction with the recipient option.

Set this option to enable users of versions of PKZIP prior to 6.1 to decrypt files encrypted using the recipient option.

Smart cards cannot decrypt files encrypted using a recipient list if this option is set.

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -recipient="Thomas Francis, Jr." nosmartcard save.zip *.doc

add

nozipextension

This option is deprecated. Use the option noarchiveextension instead.

Suppress PKZIP's adding of an identifying file extension to an archive file name

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -nozipextension file.ibm *.doc

All commands

older

Selects files that are older than a specified interval

Configurable separately for add and extract operations

With a time unit of days, the interval is measured from the beginning of the current day. With time units of hours, minutes, or seconds, the interval is measured from the current system time.


To specify an explicit date, see before.

<numeric value> A number of days, hours, minutes, or seconds defining the interval, plus a suffix identifying the kind of units used:

Suffixes:

d - Days (default)
h - Hours
m - Minutes
s
- Seconds

---------------------

No default value.

Adds files older than 24 hours:

pkzipc -add -older=24h save.zip *

Adds files older than five days:

pkzipc -add -older=5d save.zip *

pkzipc -add -older=5 save.zip *

add, extract, test, view, print, console

optionchar

Specifies the prefix character used to identify a command or option as such on the command line

Configurable

Any valid single character.
---------------------
Default = - (hyphen)

pkzipc -optionchar=+ +add save.zip *.doc

pkzipc config -optionchar=

All commands

overwrite

Specifies whether to overwrite existing files with files being added or extracted. By default, PKZIP prompts before overwriting when extracting but not when adding.

Configurable

prompt - Prompt every file individually on whether to overwrite a file that has the same name as the one being added or extracted

all - Overwrite all files that have the same name

increment - Increment file name to make it unique.

never - Never overwrite a file that already exists in the target directory or archive

---------------------

Value if used on command line without a sub-option = all.

pkzipc -extract -overwrite=all save.zip

pkzipc -add -overwrite=prompt save.zip

add, extract

owner

Changes files' associated UID and/or GID to a specified UID or GID

Configurable

<owner>:<group> - Specifies files' owner and group

<owner> - Specifies files' owner; leaves group unchanged

<group> - Specifies files' group; leaves owner unchanged

pkzipc -extract -owner=jon:eng test.zip

pkzipc -extract -owner=jon test.zip

pkzipc -extract -owner=jon test.zip

pkzipc -add -owner=0:0 test.zip

add, extract

passphrase

Protects an archive with passphrase-based encryption

PKZIP prompts for a passphrase if none is specified with the option.

Configurable

<passphrase> - The passphrase that must be supplied to extract and decrypt the files

<file name> - Name of a file that contains the text of the passphrase. The file name must be prefixed with the list character (@ by default) defined with the listchar option.

---------------------

No default value.

To include a passphrase in the command:

pkzipc -add -passphrase=beowulf save.zip

To have PKZIP prompt for a passphrase after you type the command:

pkzipc -add -passphrase save.zip

To have PKZIP get the passphrase from a file:

pkzipc -add -passphrase=@secret.txt save.zip

To extract passphrase-protected files from an archive:

pkzipc -extract -passphrase=beowulf9 save.zip

add, extract, test, print, console

path

Stores or restores directory path names for files within a .ZIP file

By default, PKZIP does not store path information

Configurable

Use the include option or place quotation marks around wildcard designations to bypass automatic wildcard expansion by the shell, which may restrict your pattern search. See "Using Wildcards with PKZIP on UNIX."

current - Store the path from the current directory.

root or full - Store the entire path beginning at the root of the drive; also referred to as "full" path.

specify or relative - Store path information relative to the specified directories, for their subdirectories

none - No path information stored

---------------------

Default = none when used with add; full when used with extract

Value if used on command line without a sub-option = current

Assuming you are in "/temp":

pkzipc -add -path=root save.zip docs/*

(the complete path is stored including "temp/docs/").

pkzipc -add -path=current save.zip docs/wp/*

(the path stored is "docs/wp").

add, extract

permission

Restores and sets extra permissions when extracting files. Normally, the setuid, setgid, and sticky bit permissions are not restored when extracting archives. Using this option restores them.

Configurable

PKZIP restores any read, write, and execute permission attributes by default. The permission option is necessary only if you wish to restore additional attributes (such as setuid, setgid, and sticky bits) or different ones.

Octal mode value.

---------------------

No default value.

Preserve all permissions and other attributes on extraction:

pkzipc -extract -permission save.zip

Preserve and/or attempt to modify all permissions and other attributes on extraction:

pkzipc -extract -permission=4111 save.zip

extract

pgpPublicKey

Specify the file containing PGP public keys.

File containing PGP public keys.

pkzipc -add -pgpPublicKey =pgpkeys.pkr test.pgp -recipient="John Smith" *.doc

add

pgpSecretKey

Specify the file containing PGP secret keys.

File containing PGP secret keys.

pkzipc -extract -pgpSecretKey =pgpkeys.skr test.pgp

add
extract

ppmd

Compress files using the PPMd method.

Configurable

Files compressed with this method can be extracted by PKZIP versions 12.3 and later, but not all ZIP programs from other vendors can extract such files.

No sub-options.

---------------------

No default value.

pkzipc -add -ppmd save.zip doc1.txt

add

preview

Prints out messages to preview the results of a set of commands or options without actually performing the tasks

No sub-options.

---------------------

No default value.

pkzipc -add -preview save.zip

add, delete, header, sfx, comment

priority

Sets the execution priority of PKZIP with regard to other programs running on the same system

Configurable, but must be included on the command line to take effect

Note: Only users with appropriate rights or privileges can raise priority of execution.

<priority level> -

A value in the range 0-39

Default = 20 

pkzipc -add mydocs.zip *.doc -priority=10

All commands

recipient

Specifies one or more recipients for certificate-based encryption. The option can appear more than once on the command line to specify multiple recipients.

Configurable

Use the recipient option with the nosmartcard option if you want users of versions of PKZIP prior to 6.1 to be able to decrypt your files.


This option is available only with SecureZIP.

cn=<Common name> - The Common Name (CN) field of the subject of the certificate. The "cn=" prefix is optional. This sub-option is the default: PKZIP searches the Common Name field if no other field is specified.

<Friendly name> - The friendly name associated with the certificate. This is often the same as the common name of the subject.

e=<email address> - The email address embedded in the subject of a digital certificate. (Note: Not all certificates contain an email address.) The "e=" prefix is optional.

f=<ldap filter> - An LDAP filter to use to filter a search for certificates on an LDAP server that you are accessing with the ldap option.

@<file name> - Specifies a text file which contains the names of recipients, one on each line.

#<file name> - Specifies a PKCS#7 or PKCS#12 file that contains certificates of the recipients you want to list.

---------------------

Default = cn=

pkzipc -add -recipient="Thomas Jones, Jr." save.zip *.doc

pkzipc -add -recipient="cn=Thomas Jones, Jr." save.zip *.doc

pkzipc -add -recipient= e=john.public@nowhere.com save.zip *.doc

pkzipc -add -recipient=john.public@nowhere.com save.zip *.doc

pkzipc -add recipient= f=(&(userCertificate=)(ou=Sales)) save.zip .doc

pkzipc -add recipient= "f=(&(userCertificate=)(ou=Sales With A Space))" save.zip .doc

pkzipc -add -recipient=@recipients.txt save.zip *.doc

pkzipc -add -recipient=#recipients.p7b save.zip *.doc

pkzipc -add -recipient=#recipients.p12 save.zip *.doc

add

recurse

Search subdirectories for files to compress

Use with path to store path information for files in subdirectories. Tip: You can use directories to combine the functionality of recurse and path.

Configurable

Use the include option or place quotation marks around wildcard designations to bypass automatic wildcard expansion by the shell, which may restrict your pattern search.

No sub-options.
---------------------
No default value.

pkzipc -add -recurse save.zip *

add

rename

Uses regular expressions to rename files as they are added or extracted.

@<list file> - A list file specifying replacement expressions, one on each line

<Replacement expression> - A separator character followed by a regular expression followed by another separator character followed by a replacement string followed by a final separator character optionally followed by "i" to ignore case

pkzipc -add -rename=/blue/green/ mydata.zip *.txt

pkzipc -add -rename=/blue/green/i mydata.zip *.txt

pkzipc extract -rename=//output.txt/ data.zip output.txt

add, extract, test

runafter

Run or open a specified file after extraction by a self-extractor

Configurable

<file name> - The file to run or open

---------------------

No default value.

Launch the file (for example, readme.txt) via the specified applications (for example, notepad.exe):

pkzipc -add -sfx -runafter="notepad.exe readme.txt" test.exe *

(add) sfx

sftp

Transfers an archive using SSH File Transfer Protocol

Configurable

Syntax (optional fields in brackets):

-ftp= [username[:pwd[:account]]@]server/path

where:

username (optional) is the user account with which to log in to the SFTP server

pwd (optional) is the passphrase associated with the user account. Colons are not allowed in the passphrase.

account (optional) is for use only with FTP servers that require additional authentication. Do not specify the account for servers that do not require it.

server is the FTP server name

path is the path to the destination of the transferred file on the server. Use two slashes (server//path) to specify a full path; use one slash (server/path) to specify a path relative to the login destination directory.

pkzipc -add -sftp=serv/home/thomas mydocs.zip *.doc

pkzipc -add -sftp=me@serv/home/thomas mydocs.zip *.doc

Standalone:

pkzipc -sftp=serve/home/thomas mydocs.zip

add, delete, header, comment, standalone

sfx

With the add command, creates a self-extracting ZIP file with a .exe file name extension. As a standalone command, converts an existing ZIP file to a self-extracting archive.

Configurable

For a listing of available self-extractors, use the listsfxtypes command.

<no sub-option> - Create a native command line self-extractor

win32_x86_g610 - Create a graphical Windows self-extractor that, when run, opens a dialog to let the user select a target extract folder

---------------------

Default = Create a native command line self-extractor for use in the command line environment of the operating system in which it was created

To create myfiles.exe:

pkzipc -add -sfx myfiles *.doc

To convert existing ZIP file myfiles.zip to self-extracting graphical Windows archive myfiles.exe:

pkzipc -sfx=win32_x86_g myfiles.zip

To convert existing ZIP file myfiles.zip to a self-extractor and specify a name for the self-extractor:

pkzipc -sfx -namesfx=newname myfiles.zip

(Converts myfiles.zip to newname.exe.)

add, standalone

sfxdestination

Specifies a default target folder for files extracted from a self-extractor

Configurable

<path> - Path to target folder

---------------------

No default value

pkzipc -add -sfx -sfxdestination="My Documents\newstuff" mysfx *.doc

add, sfx

sfxdirectories

Causes a self-extractor to restore a saved path structure on extraction. To recurse subdirectories and store path information when adding files to the archive, use with the directories option.

Configurable

No sub-options

---------------------

No default value

pkzipc -add -sfx -sfxdirectories -directories mysfx "docs*."*

add, sfx

sfxlogfile

Creates an ASCII text error log (named pkerrlog.txt) in the destination directory on extraction

Configurable

No sub-options

---------------------

No default value

pkzipc -add -sfx -sfxlogfile test.exe *

(add) sfx

sfxoverwrite

Specifies when a self-extractor overwrites files that have the same name as a file being extracted

Configurable

prompt - (Default) The user is asked whether to overwrite files

always - Files that have the same name in the destination folders are overwritten without prompting

update - Only files that do not already exist or are newer than same-named files

freshen - Only newer versions of files that already exist in the destination folders are extracted; the older files are overwritten without prompting

never - Files are never overwritten

---------------------

Default = prompt

pkzipc -add -sfx -sfxoverwrite=freshen mysfx *.doc

add, sfx

sfxtitle

Specifies the title to use for the graphical interface (GUI) that a self-extractor presents to the user.

This option only affects GUI self-extractors. (Command line self-extractors do not present a GUI.)

Configurable

Title – The title to display

pkzipc -add -sfx -sfxuitype=regularsfx -sfxtitle="My Self-Extractor" mysfx *.doc


sfxuitype

Specifies the type of graphical interface (GUI) that a self-extractor presents to the user.

This option only affects GUI self-extractors. (Command line self-extractors do not present a GUI.)

Configurable

autosfx - Presents a dialog that displays a bar to show progress extracting, and a Cancel button

easysfx - (Default) Presents a dialog that enables the user to select a destination folder and to turn off any

runafter option set

regularsfx - Presents a dialog that enables the user to change the destination folder and other options before the archive is extracted

---------------------

Default = easysfx

pkzipc -add -sfx -sfxuitype=regularsfx mysfx *.doc

add, sfx

shortname

Convert long file names of files added to an archive to WIN32-equivalent "short" file names

Configurable

dos - Convert long file names to DOS-equivalent short file names (8+3)

none - Do not convert file names

---------------------

Default = none

Value if used on command line without a sub-option = dos.

pkzipc -add -short=dos save.zip

add

shred

Overwrites PKZIP temporary files and files deleted by PKZIP to prevent recovery of their data

Configurable

The shred option is the same as the older wipe option, which is now deprecated.

none - turns off shredding: files are not overwritten

random - Overwrites files once with random data

dod5220 - Overwrites files three times, to the DOD 5220.22-M specification

nsa - Overwrites files seven times, to the NSA standard

---------------------

Default = none

Value if used on command line without a sub-option = random

pkzipc -add -move -shred=nsa myfiles.zip *

add

sign

Indicates whether the central directory or only files should be signed when using digital signatures. Use the certificate option (which can be configured) to specify the certificate to use.

For maximum security, sign both the central directory and local files.

Configurable

This option requires SecureZIP.

cd - sign central directory.

files - sign files.

all - sign both the central directory and files.

timestamp – Sign files and apply a digital timestamp to the central directory.

none - do not sign files (Used for turning signing off if it has been configured)

---------------------

Value if used on command line without a sub-option = all.

pkzipc -add -certificate="John Smith" -sign=cd save.zip *.doc

add, standalone

silent

Suppresses the display of some or all of PKZIP's messages to the user, including warnings and errors. It can also suppress prompts for inputs.

Configurable

none - Turns off the silent option; displays all messages

banner - Suppresses printing the banner

copy - Suppresses "Copy file" messages when updating archives

error - Suppresses all error and warning outputs

fileheader - Suppresses file headers when using the

console command

input - Suppresses all requests for input. If any operation requests input, an error is given

normal - Suppresses all message outputs except warnings, errors, and prompts for input

output - Suppresses all normal, error, and warning outputs

progress - Suppresses "percent complete" messages

all - Same as specifying both Input and Output. (Default if option is specified without a sub-option)

---------------------

No default value.

pkzipc -add -silent save.zip *.doc

pkzipc -config -silent

All commands except listcertificates, listcryptalgorithms, listsfxtypes, license, and version

smaller

Process only files that are smaller than or equal to a given file size, specified in bytes

Configurable separately for add and extract operations.

Numerical value that indicates a maximum desired file size

Acceptable notation:

K - 1024B
M - 1024K
G - 1024M
T - 1024G

---------------------

No default value.

pkzipc -add -smaller=5000 save.zip *

In this example, PKZIP adds only files no larger than 5000 bytes in size.

add, extract, test, view, delete, print, console

snmptraphost

Specifies an SNMP host machine running an SNMP receiver for PKZIP to send SNMP traps to.

To specify traps to send, set sub-options for the log, logoptions, and logerror options.

Configurable

Syntax (optional fields in brackets):
-snmptraphost=
-snmptraphost=[community@]host[:port]

where:

community (optional) is the community name; default is public

host is the SNMP host name or IP address

port (optional) is the port number. The default SNMP trap port is 162.

pkzipc -add mydocs.zip *.doc -snmptraphost=nmsnode1

pkzipc -extract backup1.zip -snmptraphost=private@hostxyz:20001

All commands

sort

Sort files in an archive based on specific criteria (for example, by file size). Files are then viewed, added, and extracted in the order sorted.

Configurable

The crc and ratio sub-options do not work with the add command and sort option.

crc - sort by CRC value

date - sort by file date of file

extension - sort by file extension

name - alphabetically sort files and folders together in one series by path name

natural - sort in the order files occur in the archive

ratio - sort by compression ratio

size - sort by the original, uncompressed size of the file ("length" in display)

comment - sort by file comment

none - first alphabetically sort path names that contain folders and then separately sort file names that lack folder information. (The default.)

---------------------

Default = none

Value if used on command line without a sub-option = name

pkzipc -add -sort=date save.zip *.doc

pkzipc -config -sort=date

add, extract, test, view, delete, print, console

span

Forces PKZIP to create a split archive, even when creating the archive on non-removable media.

Also formats or wipes removable media prior to writing an archive.

This option is available only for ZIP archives.

On UNIX, this option only splits an archive into segments on the hard drive; disk spanning and the sub-options are not available.

Configurable

Force - Fully format media without checking for existing files

Format - Fully format media before attempting to write to it

Quick - Quick-format media before attempting to write to it

Wipe - Delete contents of media before attempting to write to it

None - Do not format or erase media before attempting to write to it

<segment size> - Split archive into segments of predefined size (see choices below) or a specified size (in bytes) greater than 65535.

Predefined sizes:

360 = 360KB floppy

720 = 720KB floppy

1.2 = 1.2MB floppy

1.44 = 1.44MB floppy

2.88 = 2.88MB floppy.

95.7 = 100MB ZIP disk

650 = 650MB CD-ROM

700 = 700MB CD-ROM

Acceptable notation:

K - 1024B
M - 1024K
G - 1024M
T - 1024G

---------------------

Default = none

pkzipc -add -span a:\save.zip *.doc

pkzipc -add -span=format a:/save.zip *.doc

pkzipc -add -span=1.44 c:/save.zip *.doc

pkzipc -add -span=1457664 c:/save.zip *.doc

add

speed

Uses the Deflate algorithm and sets the level of compression to 1 on a scale of 0 - 9. Some files are stored (level 0) uncompressed.

Provides the fastest performance but the least compression. Files having the following extensions are stored uncompressed: bz2, bzip2, cab, gz, gzip, rar, gif, jpeg, jpg, mp3, mpeg, mpg, sxw

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -speed save.zip *.doc

pkzipc -config -speed

add

sponsor

Available only for SecureZIP Partner

Specifies a PKWARE PartnerLink sponsor. Used to determine certificates to use to authenticate a sponsor signature or to encrypt for as recipients.

Configurable

<sponsor name> - The common name of the sponsor

<sponsor ID> - The sponsor ID

pkzipr -add myfiles.zip -sponsor="Example Corp" *.doc

pkzipr -add myfiles.zip -sponsor=15 *.doc

add, extract

store

Sets the level of compression to 0 (no compression) on a scale of 0 - 9; stores the files in the archive without compressing them

Configurable

No sub-options.

---------------------

No default value.

pkzipc -add -store save.zip *.doc

pkzipc -config -store

add

stream

Gets file data to or from pipe or socket special files. Without this option, add gets only file definitions (name, permissions, times, and so on) but not data. The extract command used with this option extracts to special files instead of overwriting them with ordinary files.

Use add with filetype to have PKZIP operate on special files.

No sub-options

---------------------

No default value

Save data from pipe mystream to file mystream in archive:

pkzipc -add -filetype=pipe -stream data.zip mystream

Extract file mystream to special file mystream (if such file exists) else to an ordinary file named mystream:

pkzipc -extract -stream data.zip mystream

add, extract

strict

Applies strict checking to allow X.509 certificates to be used only if they are valid and are designated (on the certificate) for use for the intended type of operation (signing or encryption).

Configurable

KeyUsage - Controls key usage checks

TimeNesting - Controls time nesting checks

TimeValid - Controls time validity checks

---------------------

No default value

pkzipc -add -cryptalg -recipient="John Q. Public" -strict test.zip *.doc

pkzipc -add -recipient="John Q. Public" -crl -strict test.zip *.doc

add, delete, comment, header

substitution

Used with add, inserts a timestamp constructed from specified tokens in the name of a new or updated archive or, when used with the archiveeach option, in the name of the specified destination directory.

Used with extract, dynamically constructs the name of the destination folder from embedded tokens. A single command line can extract multiple archives each to a custom-named folder.

Configurable

Available tokens. These are replaced by associated values on execution:

{archivename} - (For use only with extract) Base name of archive, without the extension

{archiveext} - (For use only with extract) The file name extension of the archive (without a leading dot)

{archivepath} - (For use only with extract) The path of the archive, without the file name, preceded by a leading slash or backslash and excluding the drive letter or share path if the name is a UNC name

{id} - A job ID specified separately with the jobid option

{mm} - Month, 2-digit

{m} - Month, 1-digit (if possible)

{dd} - Day, 2-digit

{d} - Day, 1-digit (if possible)

{yyyy} - Year, 4-digit

{yy} - Year, 2-digit

{HH} - Hour, 2-digit, 24-hour format

{H} - Hour, 1-digit (if possible), 24-hour format

{hh} - Hour, 2-digit, 12-hour format

{h} - Hour, 1-digit (if possible), 12-hour format

{MM} - Minute, 2-digit

{M} - Minute, 1-digit (if possible)

{SS} - Second, 2-digit

{S} - Second, 1-digit (if possible)

{ampm} - a.m. or p.m. indicator to identify current 12-hour segment of the day

No sub-options

---------------------

No default value

This command line using tokens:

pkzipc add -substitution "Design Spec {yyyy}-{mm}-{dd}-{h}-{MM}-{SS}{ampm}.zip" plan.doc

produces a ZIP file with a name like:

Design Spec 2006-08-09-12-06-29am.zip

This command line uses the jobid option to set a value for {id}:

pkzipc -add -jobid=myJob -substitution {id}{yyyy}.zip *.doc

and results in a ZIP file with a name like:

myJob2006.zip

Extracts all ZIP files in the current directory, each to a subdirectory named after the ZIP archive extracted there

pkzipc -extract _-substitution *.zip {archivename}_

add, extract

temp

Specifies the directory to use for temporary files created by PKZIP

Configurable

The drive and/or path. For example: C: or /root/temp

---------------------

No default value.

Update the test.zip archive and use the z:\public directory location for temporary files:

pkzipc -add -temp=z:\public test.zip *.txt

Updates the .ZIP file test.zip and uses the /temp directory location for temporary files:

pkzipc -add -temp=/temp test.zip *.txt

add, delete, sfx, header, comment

test

Tests the integrity of files in a ZIP file to ensure that they can be extracted. Also authenticates signatures.

Configurable

all - all files in the archive file are tested

freshen - tests only those files in the archive that are newer versions of files that already exist in the extract directory

update - tests files in the archive that are newer versions of files that already exist in the extract directory or that do not already exist there

---------------------

Default = all

pkzipc -test save.zip

standalone

timeout

Sets a number of seconds for PKZIP to wait for another process to send or be ready to receive (more) data on a socket or block device.

Configurable

<seconds> -The period of the timeout in seconds

---------------------

Default value if used without a specified number of seconds: 30 seconds

pkzipc -extract -noArchiveExtension -timeout=60 mysocket

All commands except listcertificates, listcryptalgorithms, listsfxtypes, license, and version

times

Specifies that PKZIP should restore the extended time fields, and/or other dates stored in the archive.

Configurable

access - restores the time of last access to file(s) on extraction.

modify - restores the time of last modification to files on extraction.

all - all file times are restored.

none - file times are not restored.

---------------------

Default = all

pkzipc -extract -times=access save.zip

extract

translate

Translates EOL ("end of line") characters when adding or extracting files. For .ZIP archives, the translation occurs only for files which are marked as ASCII. For other archive types, the translation may occur on all files, including binary files.

The ebcdic sub-options work only with data compressed using SecureZIP for z/OS or SecureZIP for i5/OS with the Zip Descriptor Word (ZDW) option to preserve variable length records.

Configurable

none - no translation is performed.

dos - translates text files so that lines end with a return/newline pair (Windows default)

mac - translates text files so lines end with a single carriage return (MacOS 9 and earlier default)

unix - translates text files so lines end with a single newline (UNIX and MacOS X default)

ebcdic,nl - With ZDW files, substitute EBCDIC newline (0x15)

ebcdic,lf - With ZDW files, substitute EBCDIC linefeed (0x25)

ebcdic,crlf - With ZDW files, substitute EBCDIC carriage return/linefeed (0x0D25)

ebcdic,lfcr - With ZDW files, substitute EBCDIC linefeed/carriage return (0x250D)

ebcdic,crnl - With ZDW files, substitute EBCDIC carriage return/newline (0x0D15)

remove - Remove end of line marks

---------------------

Default = none

Value if used on command line without a sub-option = native operating system compatibility translation.

pkzipc -extract -translate=unix save.zip

pkzipc -add -translate=unix scripts.zip *.pl

add, extract, console, print

ts

Contact a Time Stamp Authority (TSA) with the supplied URL to apply a digital timestamp to the archive.

Configurable

Syntax (optional fields in brackets):

ts= [username[:pwd@]server [:port]/]page

where:

username (optional) is the user account with which to log in if the FTP server requires a login

pwd (optional) is the passphrase associated with the user account. Colons are not allowed in the passphrase.

server is the TSA server name

port is the TCP/IP port to use.

No sub-options

Add files and digitally sign and timestamp the archive test.zip using the "My Name" certificate:

pkzipc -add -sign=timestamp -certificate="My Cert" -ts=

http://tsa.example.com/tsa test.zip *.txt

Digitally sign and timestamp archive the archive test.zip using the "My Name" certificate

pkzipc -sign=timestamp -ts=

http://tsa.example.com/tsa -certificate="My Name" test.zip


sign

utf8

Enables UTF-8 characters in file names and file comments to be correctly displayed when an archive's contents are viewed or extracted in compatible non-UTF-8 locales

Configurable

No sub-options.

No default value.

pkzipc -add -utf8 test.zip *.*

add, comment

usePGPName

Derive the file name of a single file OpenPGP archive from the archive name, ignoring the original file name within the archive

Configurable

No sub-options.

No default value.

pkzipc -extract -usePGPName sample.txt.pgp

extract, test

VerifyEncryption

Verify that the encryption within the archive matches one or more of the specified encryption criteria.

none - Files are not encrypted

pkware - Files are using PKWARE encryption

aex - Files are using AE-x encryption

passphrase - Files are using strong passphrase encryption

recipient - Files are using strong recipient encryption

nopassphrase - Files are not using passphrase based encryption

norecipient - Files are not using recpient based encryption

pkzipc -verifyEncryption=none test.zip

Verify that none of the files in test.zip are encrypted.

pkzipc -verifyEncryption=passphrase,recipient test.zip

Verify that files are using either passphrase or recipient based encryption.

pkzipc -verifyEncryption=nopassphrase test.zip "-include=*.txt"

Verify that none of the *.txt files in test.zip are using passphrase-based encryption.

standalone

verifyrecipient

Verifies that an archive is encrypted for one of the X.509 certificates or OpenPGP keys specified.

#<file name> - Specifies a PKCS#7 file that contains the certificates themselves.

cn=<Common name> - The Common Name (CN) field of the subject of the certificate. The "cn=" prefix is optional.

e=<email address> - The email address embedded in the subject of a digital certificate. (Note: Not all certificates contain an email address.) The "e=" prefix is optional.

f=<ldap filter> - An LDAP filter to use to filter a search for certificates on an LDAP server that you are accessing with the ldap option.

kid<OpenPGP keyid> - Specifies the keyid of an OpenPGP key.

<short OpenPGP keyid> - 8-digit hex string specifying a short OpenPGP keyid

<long OpenPGP keyid> - 16-digit hex string specifying a long OpenPGP keyid

<X.509 public key hash> - 20-digit hex string specifying the SHA1 hash of the public key for an X.509 certificate

---------------------

Default = e.

Verify the archive is encrypted for recipients using the certificate for 'My Friend'

pkzipc -verifyEncryption=recipient -verifyRecipient="My Friend" test.zip

Verify the archive is encrypted for recipients using the certificates for 'My Friend' or 'Bob Smith'

pkzipc -verifyEncryption=recipient -verifyRecipient= bob.smith@pkware.com -verifyRecipient="My Friend" test.zip

Verify the archive is encrypted for the OpenPGP keyID 0x31C475555

pkzipc -verifyEncryption= recipient -archiveType=pgp -verifyRecipient= 31C47555 test.pgp


standalone

verifysigner

Specifies one or more certificates and constrains PKZIP to extract only archives whose central directories are signed using one of these certificates. PKZIP must also find the specified certificates locally or, using the ldap option, on LDAP.

The option can appear more than once in the same command line, to specify multiple certificates.

Configurable

cn=<Common name> - The Common Name (CN) field of the subject of the certificate. The "cn=" prefix is optional.

<Friendly name> - The friendly name associated with the certificate. This is often the same as the common name of the subject.

e=<email address> - The email address embedded in the subject of a digital certificate.

(Note: Not all certificates contain an email address.) The "e=" prefix is optional.

f=<ldap filter> - An LDAP filter to use to filter a search for certificates on an LDAP server that you are accessing with the ldap option.

@<file name> - Specifies a text file which contains a list of certificates, one on each line.

#<file name> - Specifies a PKCS#7 or PKCS#12 file that contains the certificates themselves.

---------------------

No default value.

pkzipc -extract -verifysigner="Thomas Jones, Jr." save.zip *.doc

pkzipc -extract -verifysigner="cn=Thomas Jones, Jr." save.zip *.doc

pkzipc -extract -verifysigner=e= john.public@nowhere.com save.zip *.doc

pkzipc -extract -verifysigner= john.public@nowhere.com save.zip *.doc

pkzipc -extract -verifysigner=f=(&(userCertificate=*)(ou=Sales)) save.zip .doc

pkzipc -extract -verifysigner= "f=(&(userCertificate=*)(ou=Sales With A Space))" save.zip .doc

pkzipc -extract -verifysigner= @recipients.txt save.zip *.doc

pkzipc -extract -verifysigner= #recipients.p7b save.zip *.doc

pkzipc -extract -verifysigner= #recipients.p12 save.zip *.doc

extract

version

Gives information about the version of the release. Displays complete version information; also returns to the shell particular version numbers specified by sub-options.

major - Returns the major release number. For example, if the version number is 12.10.1054, the value returned is 12.

minor - Returns the minor number of the release. For example, if the version number is 12.10.1054, the value returned is 10.

step - Returns the step, or patch value (minus 1000 if ≥ 1000). For example, if the program version is PKZIPC 12.10.1054, the value returned is 54.

product - Returns the build number of the product. For example, if the product version is SecureZIP Server 12.10.0003, the value returned is 3.

---------------------

Default = major

The command line:

pkzipc -version

outputs two lines like the following after the usual header information:

Program File Version (pkzipc): 12.30.1062

Product Version: 12.30.0004

The minor sub-option outputs just the minor version number, for example, 10:

pkzipc -version=minor

standalone

view

Displays information about the files in an archive—for example, the compressed size of a file

Configurable

brief - present information in the most compact manner.

detail - present information in the most detailed manner

normal - present information in the normal manner.

security - Display encryption and signature information

---------------------

Default = normal

pkzipc -view save.zip

standalone

warning

Pauses after every specified warning and prompts whether to continue. If no warning is specified, pauses after every warning.

Configurable

<warning number> - One or more warning numbers, separated by commas. To override a warning number configured for the option (and thus not pause and prompt on that warning), precede the number with a hyphen

---------------------

No default value.

pkzipc -extract -warning=43 save.zip *

pkzipc -extract -warning save.zip *

pkzipc -extract -warning=-43 save.zip *

add, extract, test, view

wipe

Overwrites PKZIP temporary files and files deleted by PKZIP to prevent recovery of their data

Configurable

This option is deprecated. Use the functionally identical shred option instead.

none - turns off shredding: files are not overwritten

random - Overwrites files once with random data

dod5220 - Overwrites files three times, to the DOD 5220.22-M specification

nsa - Overwrites files seven times, to the NSA standard

---------------------

Default = none

Value if used on command line without a sub-option = random

pkzipc -add -move -wipe=nsa myfiles.zip *

Add

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.