Skip to main content

UNIX Command Characteristics

This chapter describes changes you can make to the PKZIP infrastructure. For example, you can specify different characters to use for the list character and the option character, and you can cause PKZIP to display dates and times using a different format from the one used by default on your system.

Ordinarily, the original values for the settings described in this chapter should be satisfactory. You should not change them without a good reason.

Changing Date and Time Environment Variables


The locale option causes PKZIP to use your system's format for displaying dates and times. The option has two sub-options, enable and disable, to set it on or off. The option is configurable and is set on by default.

Formerly PKZIP used a date format of MMDDYY and a 12-hour time format of HH:MM. If you prefer PKZIP to use this format, you can revert to it by setting locale to disable.

If you have disabled the locale option by default, you can enable it for a particular command line by setting the option to enable in the command line. For example:

pkzipc -add -locale=enable *.doc

This command line causes PKZIP to use the system-defined settings regardless of the default settings.

Changing the List Character for List Files


PKZIP allows you to specify an ASCII file as a source list of the files to be archived. By default, you specify this ASCII file by pointing to it with the "@" character in your command line. However, if you have files that begin with an "@", you may experience problems when trying to add these files to a .ZIP archive. Fortunately, PKZIP allows you to change the default list character to avoid such problems. This is accomplished using the listchar option. For example, if you wish to define the "+" character in place of the "@" as your default list character, type the following and press ENTER:

pkzipc -config -listchar=+

If you wish to specify an alternate list character on the command line itself, you could type a command line similar to the following and press ENTER:

pkzipc -add -listchar=+ +file1.txt

When used as a command line option, the listchar option only applies to the options that follow it on that command line. In our example the listchar option allows you to add files that begin with an "+" character (such as +file1.txt). For more information on using list files with PKZIP see " Compressing Files with a List File" and "Extracting Files with a List File."

Note: Avoid using metacharacters as list characters. Metacharacters have a special significance to the shell and as such their usage may cause unpredictable results. This would include the following characters:

; , & ( ) | < > # NEWLINE SPACE TAB

Changing the Command/Option Character


The optionchar option specifies the character to use to identify commands and options as such in command lines. By default, PKZIP uses the hyphen  to flag commands and options in a command line. You can use optionchar to change this option character to a different character instead. For example, to make it easier to zip files whose names begin with a (-), you might change the option character to a "+".

You can change the option character either just for a single command line or indefinitely, to define a new default character. The following command changes the option character just for the immediate command:

pkzipc -optionchar=+ +add *.doc

You can also use optionchar with the configuration command to define a different option character to use by default. For example:

pkzipc config -optionchar=

Note that the newly defined option character is used immediately, in the same command line in which it is defined, by every command or option other than optionchar itself.

Note: Avoid using metacharacters as option characters. Metacharacters have a special significance to the shell and as such their usage may cause unpredictable results. This would include the following characters:
; , & ( ) | < > # NEWLINE SPACE TAB

JavaScript errors detected

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

If this problem persists, please contact our support.