1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636 |
- .!
- .! File: ZIP_CLI.HELP
- .!
- .! Author: Christian Spieler
- .!
- .! Date: 05 Dec 95 (orig. ZIP.RNH, 22 Oct 91)
- .!
- .! Description:
- .!
- .! TPU-processable source file to produce VMS on-line help for
- .! portable Zip. Adapted from ZIP.RNH, originally based on
- .! ZIP.MAN (now MANUAL).
- .!
- .! To build:
- .! $ EDIT /TPU/NOSECTION/NODISPLAY/COMMAND=CVTHELP.TPU ZIP_CLI.HELP
- .! $ RUNOFF /OUT=ZIP_CLI.HLP ZIP_CLI.RNH
- .! $ LIBR /HELP/INSERT libr ZIP_CLI
- .!
- .! Modification history:
- .!
- .! 01-001 Christian Spieler 05-DEC-1995 02:02
- .! Genesis.
- .! 01-002 Christian Spieler 20-JAN-1996 03:09
- .! Modified /LICENSE and /VERBOSE descriptions.
- .! 01-003 Christian Spieler 11-FEB-1996 23:09
- .! Added /[NO]EXTRA_FIELDS description.
- .! 01-004 Christian Spieler 11-MAR-1996 20:08
- .! Removed /ENCRYPT=VERIFY option.
- .! 01-005 Christian Spieler 11-MAY-1996 23:08
- .! Corrected/enhanced info about how to get help on UNIX options.
- .! 01-006 Christian Spieler 21-JUL-1997 22:26
- .! Updated for new options of Zip 2.2.
- .! 01-006 Christian Spieler 14-OCT-1997 22:04
- .! Cleanups for Zip 2.2 release (no version change).
- .! 01-007 Steven Schweda 15-MAY-2007
- .! Zip 3.0.
- .! 01-007 Ed Gordon 15-MAY-2007
- .! Minor updates to Zip 3.0 help.
- .!
- <INIT>
- <MAIN>
- ZIP
- Zip is a compression and file packaging utility for several operating
- systems, including UNIX, VMS, MSDOS, OS/2, Windows 9x/NT/XP, Minix,
- Atari, Macintosh, Amiga, and Acorn RISC OS. It is analogous to a
- combination of tar and compress and is compatible with PKZIP (Phil
- Katz's ZIP) for MSDOS systems.
- Zip is useful for packaging a set of files for distribution, for
- archiving files, and for saving disk space by temporarily compressing
- unused files or directories. A companion program, UnZip, unpacks Zip
- archives.
- For brief help on Zip or UnZip, run the program without specifying any
- parameters on the command line.
- This description covers the Zip program which uses a VMS-style CLI
- command line. The VMS CLI Zip program also accepts UNIX-style "-opt"
- options, but a separate Zip program is available which provides only a
- UNIX-style command line, and it has its own documentation. Refer to
- the Zip installation instructions for details.
- <FORMAT>
- ZIP [/options] archive inpath, inpath ...
- .!
- <TOPIC>
- Basic_Usage
- <FORMAT>
- ZIP [/options] archive inpath, inpath ...
- The default action of Zip is to add or replace entries in "archive" from
- the list of "inpath" file specifications, which can include directories
- and file names with VMS-style wildcards. If /BATCH is specified, Zip
- will read file specifications from a list file or from SYS$INPUT
- (stdin).
- With SET PROCESS /PARSE_STYLE = EXTENDED (available on recent non-VAX
- systems), Zip preserves the case of the command line. Otherwise, mixed-
- or upper-case arguments (file names) must be quoted. Examples in this
- document generally do not show this quotation, so VAX and /PARSE_STYLE =
- TRADITIONAL users (that is, troglodytes) will need to add quotation
- where needed when working with these examples.
- General
- Zip reads one or more files, compresses the data (normally), and stores
- the compressed information into a single Zip archive file, along with
- information about each file (name, path, date and time of last
- modification, protection, and check information to verify file
- integrity). On a VMS system, Zip can also save VMS/RMS file attributes,
- allowing UnZip to restore the files without loss of important file
- attributes. Zip can pack an entire directory structure into a Zip
- archive with a single command.
- Compression
- Compression ratios of 2:1 to 3:1 are common for text files. Zip has one
- standard compression method ("deflate") and can also store files without
- compression. Zip (and UnZip) may be built with optional support for the
- bzip2 compression method. Then, the user may select bzip2 compression
- instead of the default "deflate" method. Zip automatically chooses
- simple storage over compression for a file, if the specified compression
- method does not actually compress the data in that file.
- Compatibility
- Zip and UnZip can work with archives produced by PKZIP (supporting most
- PKZIP features up to PKZIP version 4.6), and PKZIP and PKUNZIP can work
- with archives produced by Zip (with some exceptions, notably streamed
- archives, but recent changes in the .ZIP file standard may facilitate
- better compatibility). Zip version 3.0 is compatible with PKZIP 2.04
- and also supports the Zip64 extensions of PKZIP 4.5 which allows
- archives as well as files to exceed the previous 2 GB limit (4 GB in
- some cases). Zip also supports bzip2 compression if the bzip2 library
- is included when Zip is built. Note that PKUNZIP 1.10 cannot extract
- files produced by PKZIP 2.04 or Zip 3.0. You must use PKUNZIP 2.04g or
- UnZip 5.0p1 (or later versions) to extract them.
- Large Archives and Zip64
- Where the operating system and C run-time support allow, Zip 3.0 and
- UnZip 6.0 (and later versions) support large files (input and archive),
- using the Zip64 extensions to the original .ZIP file format. On VMS,
- this genarally means non-VAX systems with VMS V7.2 or later (perhaps
- requiring a C RTL ECO before VMS V7.3-2).
- Zip automatically uses the Zip64 extensions when a file 4 GB or larger
- is added to an archive, an archive containing a Zip64 entry is updated
- (if the resulting archive still needs Zip64), the size of the archive
- will exceed 4 GB, or when the number of entries in the archive will
- exceed about 64K. Zip64 is also used for archives streamed to a
- non-seekable output device. You must use a 4.5 compatible UnZip to
- extract files using the Zip64 extensions such as UnZip 6.0 or later.
- In addition, streamed archives, entries encrypted with standard
- encryption, or split archives created with the pause option may not be
- compatible with PKZIP as data descriptors are used, and PKZIP at the
- time of this writing does not support data descriptors (but recent
- changes in the PKWare published .ZIP file standard now include some
- support for the data descriptor format Zip uses).
- <TOPIC>
- More_Usage
- Here is a very simple example of Zip use:
- <LITERAL>
- | zip stuff.zip *.*
- <LARETIL>
- This will create the Zip archive "stuff.zip" (assuming it does not
- already exist) and put all the (non-directory) files (";0") from the
- current default directory into "stuff.zip" in a compressed form. The
- archive is opened using a default file specification of
- "SYS$DISK:[].zip", so specifying "stuff" as the archive name would also
- create (or use an existing) "stuff.zip", but specifying "stuff.other"
- would give you that name. In general, Zip doesn't care about the type
- in the file specification, but for split archives (archives split over
- multiple files), the user should normally specify a type-less name,
- because Zip will normally generate sequentially numbered types ".z01",
- ".z02", and so on for the early splits, and then the required ".zip" for
- the last split. These file types are required by the Zip standard for
- split archives.
- Standard VMS wildcard expansion ($SEARCH) is used to interpret the
- "inpath" file and directory specifications, like the "*.*" in this
- example.
- On VMS, the most natural way to archive an entire directory tree is to
- use a directory-depth wildcard ("[...]"). For example:
- <LITERAL>
- | zip foo [...]*.*
- <LARETIL>
- This will create the file "foo.zip" containing all the files (";0") and
- directories in and below the current default directory. A more
- UNIX-like way to do this would be to use the /RECURSE option:
- <LITERAL>
- | zip /recurse foo *.*
- <LARETIL>
- Zip avoids including its own output files when selecting files to
- include in the archive, so it should be safe, as in this case, to create
- the archive in the same drectory as the input files.
- One or more specific files, directories, or subdirectories may also be
- specified:
- <LITERAL>
- | zip foo.zip readme.txt, [www...]*.*, [.ftp...]*.*, -
- | [.src]*.h, [.src]*.c
- <LARETIL>
- For security reasons, paths in Zip archives are always stored as
- relative paths, so some care is needed when creating an archive so that
- it will create the intended directory structure when UnZip is used to
- unpack it.
- To use /RECURSE with a specific directory, the name of the directory
- file itself must be specified:
- <LITERAL>
- | zip /recurse foo.zip [000000]www.dir, ftp.dir
- <LARETIL>
- You may want to make an archive that contains the files in [.foo], but
- not record the directory name, "foo". You can use the /JUNK (junk path)
- option to leave off the path:
- <LITERAL>
- | zip /junk foo [.foo]*.*
- <LARETIL>
- If you are short on disk space, you might not have enough room to hold
- both the original directory and the corresponding compressed Zip
- archive. In this case, you can create the archive in steps, and use the
- -m option. For example, if [.foo] contains the subdirectories [.tom],
- [.dick], and [.harry], you could:
- <LITERAL>
- | zip /move foo [.foo.tom...]*.*
- | zip /move foo [.foo.dick...]*.*
- | zip /move foo [.foo.harry...]*.*
- <LARETIL>
- The first command would create foo.zip, and the next two would add to
- it. The /MOVE option will cause Zip to delete all files added to the
- archive after making or updating foo.zip. No deletions will be done
- until the Zip operation has completed with no errors. This option is
- obviously dangerous and should be used with care, but it does reduce the
- need for free disk space. When /MOVE is used, the /TEST option is
- recommended and will test the resulting archive before deleting the
- input files.
- If a file specification list is too long to fit conveniently on the Zip
- command line, the /BATCH option can be used to cause Zip to read a list
- of file specifications from a file or from SYS$INPUT (stdin). If a DCL
- command procedure is used, the names can be specified in the procedure:
- <LITERAL>
- | $ zip foo /batch
- | $ deck
- | file_spec_1
- | file_spec_2
- | file_spec_3
- | $ eod
- <LARETIL>
- The file specifications can also be put into a separate file, and fed
- into Zip by specifying that file as "/BATCH = list_file", or by
- explicitly defining SYS$INPUT, or by using PIPE. For example, with the
- list in foo.zfl:
- <LITERAL>
- | zip foo /batch = foo.zfl
- <LARETIL>
- or:
- <LITERAL>
- | define /user_mode sys$input foo.zfl
- | zip foo /batch
- <LARETIL>
- or:
- <LITERAL>
- | pipe type foo.zfl | zip foo /batch
- <LARETIL>
- If Zip is not able to read a file, it issues a warning but continues.
- See the /MUST_MATCH option for more on how Zip handles patterns that are
- not matched and files that are not readable. If some files were
- skipped, a warning is issued at the end of the Zip operation noting how
- many files were read and how many skipped.
- <TOPIC>
- Environment
- A user can specify default command-line options and arguments by
- defining an "environment variable" (that is, a logical name or DCL
- symbol), "ZIP_OPTS" or "ZIPOPT", to specify them. If both "ZIP_OPTS"
- and "ZIPOPT" are specified, the definition of "ZIPOPT" prevails.
- UNIX-style command-line options are required in these variables, even
- for the VMS CLI Zip program. For details, see the help topic
- UNIX_Options, or the separate Zip help for the UNIX-style command line.
- The C RTL function getenv() is used to sense these variables, so its
- behavior determines what happens if both a logical name and a symbol are
- defined. As of VMS V7.3, a logical name supercedes a symbol.
- The "zip /VERBOSE" report should show the perceived settings of these
- variables.
- For example, the following will cause Zip to skip directories, include
- VMS portable attribute information, and perform all operations at
- quiet-level 1 by default:
- <LITERAL>
- | $ define ZIP_OPTS "-qDV"
- <LARETIL>
- Note that the quotation marks here are required to preserve lowercase
- options (opposite of the command-line behavior).
- <TOPIC>
- Exit_Status
- On VMS, Zip's UNIX-style exit values are mapped into VMS-style status
- codes with facility code 1955 = %x7A3, and with the inhibit-message
- (%x10000000) and facility-specific (%x00008000) bits set:
- <LITERAL>
- | %x17A38001 normal exit
- | %x17A38000+ 16* Zip_error_code warnings
- | %x17A38002+ 16* Zip_error_code normal errors
- | %x17A38004+ 16* Zip_error_code fatal errors
- <LARETIL>
- Note that multiplying the UNIX-style Zip error code by 16 places it
- conveniently in the hexadecimal representation of the VMS exit code,
- "__" in %x17A38__s, where "s" is the severity code. For example, a
- truncated archive might cause Zip error code 2, which would be
- transformed into the VMS exit status %x17A38024.
- The Zip VMS exit codes include severity values which approximate those
- defined by PKWARE, as shown in the following table:
- <LITERAL0>
- | VMS Zip err
- |severity code Error description
- |---------+---------+----------------------------------------------
- |Success 0 (OK) Normal; no errors or warnings detected.
- |Fatal 2 (EOF) Unexpected end of archive.
- |Error 3 (FORM) A generic error in the archive format
- | was detected. Processing may have completed
- | successfully anyway; some broken archives
- | created by other archivers have simple work-
- | arounds.
- |Fatal 4 (MEM) Zip was unable to allocate memory for
- | one or more buffers during program initializ-
- | ation.
- |Fatal 5 (LOGIC) A severe error in the archive format
- | was detected. Processing probably failed
- | immediately.
- |Error 6 (BIG) Entry too large to split, read, or
- | write.
- |Error 7 (NOTE) Invalid comment format.
- |Fatal 8 (TEST) Zip -T failed or out of memory.
- |Error 9 (ABORT) The user aborted zip prematurely
- | with control-C (or equivalent).
- |Fatal 10 (TEMP) Zip encountered an error while using
- | a tempfile.
- |Fatal 11 (READ) Read or seek error.
- |Warning 12 (NONE) Zip has nothing to do.
- |Error 13 (NAME) Missing or empty zip file.
- |Fatal 14 (WRITE) Error writing to a file.
- |Fatal 15 (CREAT) Zip was unable to create a file to
- | write to.
- |Error 16 (PARMS) Bad command line parameters.
- |Error 18 (OPEN) Zip could not open a specified file
- | to read.
- |Fatal 19 (COMPERR) Zip was built with options not
- | supported on this system.
- |Fatal 20 (ZIP64) Attempt to read unsupported Zip64
- | archive.
- <0LARETIL>
- <TOPIC>
- File_Names
- Zip deals with file names in the system file system and with file names
- in Zip archives. File names in a Zip archive are stored in a UNIX-like
- path-name format. For example, a VMS file specification like this:
- <LITERAL>
- [.zip30.vms]descrip.mms
- <LARETIL>
- could appear in a Zip archive as:
- <LITERAL>
- zip30/vms/descrip.mms
- <LARETIL>
- For security reasons, paths in Zip archives are always stored as
- relative paths, so an absolute VMS directory specification will be
- transformed to a relative path in the archive (that is, no leading "/").
- For example, the following absolute directory specification would give
- the same archive path as the previous (relative) example:
- <LITERAL>
- [zip30.vms]descrip.mms
- <LARETIL>
- Also, device names are dropped, so the following file specification
- would also give the same archive path:
- <LITERAL>
- sys$sysdevice:[zip30.vms]descrip.mms
- <LARETIL>
- If an archive is intended for use with PKUNZIP under MSDOS, then the
- /PKZIP option should be used to attempt to adjust the names and paths to
- conform to MSDOS character-set and length limitations, to store only the
- MSDOS file attributes (just the owner:write attribute from VMS), and to
- mark the entry as made under MSDOS (even though it wasn't).
- Note that file specifications in the file system must be specified using
- VMS notation, but file names in an archive must be specified using the
- UNIX-like notation used in the archive. For example, where a BACKUP
- command might look like this:
- <LITERAL>
- $ back [.zip30...]*.* /excl = [...vms]*.c stuff.bck /save
- <LARETIL>
- a corresponding Zip command might look like this:
- <LITERAL>
- $ zip /exclude = "*/vms/*.c" stuff.zip [.zip30...]*.*
- <LARETIL>
- because the files to be added to the Zip archive are specified using VMS
- file specifications, but the /EXCLUDE option excludes names based
- on their archive path/file names. Options dealing with archive names
- include /COPY_ENTRIES, /DELETE, /EXCLUDE, /INCLUDE, and
- /RECURSE=FILENAMES.
- Note that a UNIX-like path specification must be quoted, or else the
- slashes ("/") will confuse the command-line interpreter, causing errors
- like "%CLI-W-IVQUAL, unrecognized qualifier - check validity, spelling,
- and placement".
- Note: By default, on VMS, archive name pattern matching (/COPY_ENTRIES,
- /DELETE, /EXCLUDE, /INCLUDE, and /RECURSE=FILENAMES) is case sensitive,
- even when the file system is not case sensitive (or even case
- preserving). This allows accurate matching of mixed-case names in an
- archive which may have been created on a system with a case sensitive
- file system, but it can involve extra effort on VMS, where it may be
- necessary to use unnatural case names (or the same names in multiple
- cases, like "*.obj *.OBJ") for this kind of pattern matching to give the
- desired behavior. If completely case-blind pattern matching behavior is
- desired, specify the /PATTERN_CASE=BLIND option.
- <TOPIC>
- Modes_of_Operation
- Zip supports two distinct types of command modes, external and
- internal. The external modes (update, grow, and freshen) read files
- from the file system (as well as from an existing archive) while the
- internal modes (delete and copy) operate exclusively on entries in an
- existing archive.
- <LITERAL>
- /UPDATE
- <LARETIL>
- Update existing entries and add new files. If the archive does not
- exist, create it. This is the default mode, so /UPDATE is optional.
- <LITERAL>
- /GROW
- <LARETIL>
- Grow (append to) the specified Zip archive, instead of creating a new
- one. If this operation fails, Zip attempts to restore the archive to
- its original state. If the restoration fails, the archive might become
- corrupted. This option is ignored when there's no existing archive or
- when at least one archive member must be updated or deleted.
- <LITERAL>
- /FRESHEN
- <LARETIL>
- Update existing entries in an existing archive. Does not add new files
- to the archive.
- <LITERAL>
- /DELETE
- <LARETIL>
- Delete entries from an existing archive.
- <LITERAL>
- /COPY_ENTRIES
- <LARETIL>
- Select entries in an existing archive and copy them to a new archive.
- Copy mode is like update mode, but entries in the existing archive are
- selected by command line patterns rather than files from the file system
- and it uses the /OUTPUT option to write the resulting archive to a new
- file rather than updating the existing archive, leaving the original
- archive unchanged.
- <LITERAL>
- /DIFFERENCE
- <LARETIL>
- Create an incremental backup-style archive, where the resulting archive
- will contain all new and changed files since the original archive was
- created. For this to work, the input file list and current directory
- must be the same as during the original Zip operation.
- For example, if the existing archive was created using
- <LITERAL>
- zip foo_full.zip [.foo...]*.*
- <LARETIL>
- from just above the foo directory, then the command (also from just
- above the foo directory):
- <LITERAL>
- zip /difference /output = foo_incr.zip foo_full.zip [.foo...]*.*
- <LARETIL>
- creates the archive foo_incr.zip with just the files not in foo_full.zip
- and the files where the size or date-time of the files does not match
- that in foo_full.zip. Note that in the "ZIP /DIFFERENCE" operation, the
- original full archive is specified as the input archive, and the /OUTPUT
- option is used to specify the new (incremental) output archive.
- <LITERAL>
- /FILESYNC
- <LARETIL>
- Delete entries in the archive that do not match files on the OS.
- Normally files already in an archive that are not updated remain
- in the archive unchanged. The /FILESYNC option deletes files in
- the archive that are not matched during the directory scan,
- resulting in the archive being updated having the same contents
- as a new archive would. If much of the archive will remain
- unchanged, this can be faster than creating a new archive as
- copying entries is faster than compressing and adding new files.
- Normally, when updating an archive using relative file specifications
- ("[]", "[.xxx]", and so on), it helps to have the same default directory
- as when the archive was created, but this is not a strict requirement.
- <TOPIC>
- Self_Extracting_Archives
- A self-extracting archive (SFX) comprises a normal Zip archive appended
- to a special UnZip program (such as UNZIPSFX_CLI.EXE) for the intended
- target system.
- The UnZip distribution includes a VMS command procedure,
- [,vms]makesfx.com, which can be used directly or adapted to create an
- SFX archive from a normal Zip archive.
- The .ZIP file format includes offsets to data structures in the archive,
- and these offsets are measured from the start of the archive file.
- Appending an archive to an UnZip SFX executable effectively moves the
- start of the archive file. That makes the original offsets wrong, and
- that will cause the UnZip SFX program to emit warning messages when it
- tries to unpack the archive. Zip /ADJUST_OFFSETS can be used to adjust
- these offsets in a self-extracting archive. For example, to adjust the
- offsets in foo.sfx_exe:
- <LITERAL>
- | zip /adjust_offsets foo.sfx_exe
- <LARETIL>
- Similarly, the UnZip SFX program can be removed from a self-extracting
- archive (and the offsets in the archive restored) using the /UNSFX
- option. For example:
- <LITERAL>
- | zip /unsfx foo.sfx_exe
- <LARETIL>
- Note that a self-extracting archive contains a normal Zip archive, and a
- normal UnZip program can be used to expand it in the normal way. You
- may get a warning about extra bytes at the beginning of the archive (the
- UnZip SFX program), but UnZip should work properly after that. This
- allows data in a self-extracting archive to be accessed on any system,
- not just the target system where its embedded UnZip SFX program runs.
- <TOPIC>
- Split_Archives
- Beginning with version 3.0, Zip supports split archives. A split
- archive is one which is divided into multiple files, usually to allow it
- to be stored on multiple storage media (floppy diskettes, CD-ROMs, or
- the like) when a single medium would be too small to contain the whole
- archive. (Note that split archives are not just unitary archives split
- into pieces, as the .ZIP file format includes offsets to data structures
- in the archive, and for a split archive these are based on the start of
- each split, not on the start of the whole archive. Concatenating the
- pieces will invalidate these offsets, but UnZip can usually deal with
- it. Zip will usually refuse to process such a spliced archive unless
- the /FIX = FULL option is used to fix the offsets.)
- For a split archive with, say, 20 split files, the files are typically
- named ARCHIVE.z01, ARCHIVE.z02, ..., ARCHIVE.z19, ARCHIVE.zip, where
- "ARCHIVE" is the archive name specified by the user on the Zip command
- line. Note that the last split file is the ".zip" file. In contrast,
- "spanned" archives are the original multi-disk archive generally
- requiring floppy disks and using volume labels to store disk numbers.
- Zip supports split archives but not spanned archives, though a procedure
- exists for converting split archives of the right size to spanned
- archives. The reverse is also true, where each file of a spanned
- archive can be copied in order to files with the above names to create a
- split archive.
- <QUALIFIERS>
- <QUALIFIER>
- /ADJUST_OFFSETS
- /ADJUST_OFFSETS
- Adjust internal offsets of the Zip archive members after some data
- (e.g. a SFX executable stub) has been prepended to the archive file.
- <QUALIFIER>
- /APPEND
- /APPEND
- /GROW
- Grow (append to) the specified Zip archive, instead of creating a new
- one. If this operation fails, Zip attempts to restore the archive to
- its original state. If the restoration fails, the archive might become
- corrupted. This option is ignored when there's no existing archive or
- when at least one archive member must be updated or deleted.
- See also /DELETE /DIFFERENCE, /FRESHEN, /UPDATE.
- <QUALIFIER>
- /BATCH
- /BATCH[=list_file]
- Read input file specifications (inpaths) from "list_file" (one per
- line). The list_file defaults to SYS$INPUT.
- <QUALIFIER>
- /BEFORE
- /BEFORE=VMS_date_time
- Restricts the files by date-time when adding, updating, or freshening an
- archive. Only files with modification date-times earlier than the
- specified date-time are accepted.
- See also /SINCE.
- <QUALIFIER>
- /COMMENTS
- /COMMENTS[=KEYWORD[,KEYWORD]]
- Add comments to the Zip archive.
- <LITERAL>
- | ARCHIVE Add/replace the multi-line archive comment. (default)
- | FILES Add file comment to each updated/added archive member.
- <LARETIL>
- The Zip program prompts for each comment to be added, which makes sense
- only if Zip is run interactively.
- The one-line file (archive member) comments are terminated by typing
- <Return>. To skip a file comment, just type <Return> without entering
- any further characters.
- The Zip archive comment may be multi-line. The comment is ended by a
- line containing just a period, or by an end-of-file character (CTRL/Z).
- <QUALIFIER>
- /COMPRESSION
- /COMPRESSION = {BZIP2|DEFLATE|STORE}
- Specify the compression method to be used when adding or updating files
- in an archive. STORE disables compression (like /LEVEL = 0). Default:
- /COMPRESSION = DEFLATE.
- Zip can archive files with or without compression. The standard
- compression method ("deflate") is compatible with all UnZip versions
- (except really old ones that only understand the "store" method).
- Current Zip and UnZip versions may be built with optional support for
- the bzip2 compression method. (The bzip2 method can compress better,
- especially when compressing highly redundant files, but uses more CPU
- time, and requires an UnZip which includes the optional bzip2 support.
- See the installation instructions for details on adding bzip2
- compression support at build time.)
- <QUALIFIER>
- /COPY_ENTRIES
- /COPY_ENTRIES
- Select entries in an existing archive and copy them to a new archive.
- Copy mode is like update mode, but entries in the existing archive are
- selected by command line patterns rather than files from the file system
- and it uses the /OUTPUT option to write the resulting archive to a new
- file rather than updating the existing archive, leaving the original
- archive unchanged.
- <QUALIFIER>
- /DELETE
- /DELETE
- Delete entries from archive.
- See also /DIFFERENCE, /FRESHEN, /GROW, /UPDATE.
- <QUALIFIER>
- /DIFFERENCE
- /DIFFERENCE
- Create an incremental backup-style archive, where the resulting archive
- will contain all new and changed files since the original archive was
- created. For this to work, the input file list and current directory
- must be the same as during the original Zip operation.
- See also /DELETE, /FRESHEN, /GROW, /UPDATE.
- <QUALIFIER>
- /DIRNAMES
- /DIRNAMES (default)
- /NODIRNAMES
- Store directory entries in the archive.
- <QUALIFIER>
- /DISPLAY
- /DISPLAY=(KEYWORD[,KEYWORD[...]])
- Enable display of progress messages.
- <LITERAL>
- | BYTES Running count of bytes processed and bytes to go.
- | COUNTS Running count of entries done and entries to go.
- | DOTS = size Dots every <size> MB while processing files.
- | (0: no dots.)
- | GLOBALDOTS Progress dots reflect the whole archive instead of each
- | file.
- | USIZE Uncompressed size of each entry.
- | VOLUME Display the volume (disk) number each entry is being
- | written to.
- <LARETIL>
- The default is a dot every 10 MB of input file processed. The /VERBOSE
- option also displays dots and used to at a higher rate than this (at the
- same rate as in previous versions of Zip) but this rate has been changed
- to the new 10 MB default, and is also controlled by /DISPLAY=DOTS=size.
- <QUALIFIER>
- /DOT_VERSION
- /DOT_VERSION
- Directs Zip to retain VMS file version numbers on names in an archive,
- but as ".nnn" instead of ";nnn". By default, for compatibility
- with non-VMS systems, Zip strips VMS file version numbers from the names
- stored in an archive. Thus, without /DOT_VERSION or /KEEP_VERSION, a
- version number wildcard (";*") can cause errors when multiple versions
- of a single file are treated as multiple files with the same name.
- See also /KEEP_VERSION.
- <QUALIFIER>
- /ENCRYPT
- /ENCRYPT[="password"]
- Encrypt new or updated archive entries using a password which is
- supplied by the user interactively on the terminal in response to a
- prompt. (The password will not be echoed.) If SYS$COMMAND is not a
- terminal, Zip will exit with an error. The password is verified before
- being accepted.
- You may specify the password on the command line, although we do not
- recommend it because THIS IS INSECURE. Remember to enclose the password
- string with quotation marks ("pass word"), to prevent automatic
- conversion to upper case or misinterpretation of punctuation characters
- by DCL.
- Because standard Zip encryption is weak, where security is truly
- important, use a strong encryption program, such as Pretty Good Privacy
- (PGP) or GNU Privacy Guard (GnuPG), on an archive instead of standard
- Zip encryption. A stronger encryption method, such as AES, is planned
- for Zip 3.1.
- <QUALIFIER>
- /EXCLUDE
- /EXCLUDE=(file[,...])
- A comma-separated list of files to exclude when deleting, updating, or
- adding files in the archive. If multiple files are specified, the list
- should be enclosed in parentheses.
- <QUALIFIER>
- /EXLIST
- /EXLIST=list_file
- The files matching the filename patterns listed in "list_file" are
- excluded when deleting, updating or adding files in the archive.
- The "list_file" is a normal text file with one filename pattern entry per
- line. The name pattern entries are recognized exactly as found in
- "list_file", including leading, embedded, and trailing whitespace or most
- control characters (with exception of LineFeed and probably CarriageReturn).
- <QUALIFIER>
- /EXTRA_FIELDS
- /EXTRA_FIELDS (default)
- /NOEXTRA_FIELDS
- Allows (or suppresses) the saving of any optional extra fields in the
- archive. (/NOEXTRA_FIELDS conflicts with /VMS[=ALL].)
- The .ZIP file format allows some extra data to be stored with a file in
- the archive. For example, where local time zone information is
- available, Zip can store UTC date-time data for files. (Look for
- USE_EF_UT_TIME in a "zip -v" report.) On VMS, with /VMS[=ALL], Zip will
- also store VMS-specific file attributes. These data are packaged as
- "extra fields" in the archive. Some extra fields are specific to a
- particular operating system (like VMS file attributes). Large files
- (bigger than 4GB) on any OS require an extra field to hold their 64-bit
- size data. Depending on the capabilities of the UnZip program used to
- expand the archive, these extra fields may be used or ignored when files
- are extracted from the archive.
- Some extra fields, like UTC date-times or VMS file attributes, are
- optional. Others, like the Zip64 extra field which holds 64-bit sizes
- for a large file, are required.
- <QUALIFIER>
- /FILESYNC
- /FILESYNC
- Delete entries in the archive that do not match files on the OS.
- Normally when an archive is updated, new files are added and changed
- files are updated but files that no longer exist on the OS are not
- deleted from the archive. This option enables deleting of entries that
- are not matched on the OS. Enabling this option should create archives
- that are the same as new archives, but since existing entries are copied
- instead of compressed, updating an existing archive with /FILESYNC can
- be much faster than creating a new archive. If few files are being
- copied from the old archive, it may be faster to create a new archive
- instead.
- This option deletes files from the archive. If you need to preserve the
- original archive, make a copy of the archive first, or use the /OUTPUT
- option to output the new archive to a new file. Even though it's
- slower, creating a new archive with a new archive name is safer, avoids
- mismatches between archive and OS paths, and is preferred.
- <QUALIFIER>
- /FIX_ARCHIVE
- /FIX=_ARCHIVE={NORMAL|FULL}
- The /FIX_ARCHIVE=NORMAL option (NORMAL is the default) can be used if
- some portions of the archive are missing, but it requires a reasonably
- intact central directory. The input archive is scanned as usual, but
- zip will ignore some problems. The resulting archive should be valid,
- but any inconsistent entries will be left out.
- If the archive is too damaged or the end (where the central directory is
- situated) has been truncated, you must use /FIX_ARCHIVE=FULL. This is
- a change from zip 2.32, where the /FIX=NORMAL option was able to read a
- truncated archive. The /FIX=NORMAL option now more reliably fixes
- archives with minor damage, and the /FIX=FULL option is needed to fix
- some archives where /FIX=NORMAL was sufficient before.
- With /FIX=FULL, the archive is scanned from the beginning and Zip scans
- for special signatures to identify the limits between the archive
- members. The /FIX=NORMAL option is more reliable if the archive is not
- too much damaged, so try this option first.
- Neither option will recover archives that have been incorrectly
- transferred, such as by FTP in ASCII mode instead of binary. After the
- repair, the /TEST (-t) option of UnZip may show that some files have a
- bad CRC. Such files cannot be recovered; you can remove them from the
- archive using the /DELETE option of Zip.
- Because of the uncertainty of the "fixing" process, it's required
- to specify an output archive, rather than risking further damage to the
- original damaged archive. For example, to fix the damaged archive
- foo.zip:
- <LITERAL>
- zip /fix_archive /output=foo_fix foo
- <LARETIL>
- tries to read the entries normally, copying good entries to the new
- archive foo_fix.zip. If this doesn't work, as when the archive is
- truncated, or if some entries are missed because of bad central
- directory entries, try /FIX_ARCHIVE=FULL:
- <LITERAL>
- zip /fix_archive=full /output=foo_fixfix foo
- <LARETIL>
- and compare the resulting archive to the archive created using
- /FIX=NORMAL. The /FIX=FULL option may create an inconsistent archive.
- Depending on what is damaged, you can then use the /FIX=NORMAL option to
- fix that archive.
- A split archive with missing split files can be fixed using /FIX=NORMAL
- if you have the last split of the archive (the ".zip" file). If this
- file is missing, you must use /FIX=FULL to fix the archive, which will
- prompt you for the splits you have.
- Currently, the fix options can't recover an entry which has a bad
- checksum or is otherwise damaged.
- <QUALIFIER>
- /FRESHEN
- /FRESHEN
- Update existing entries in an existing archive. Does not add new files
- to the archive.
- See also /DELETE, /DIFFERENCE, /GROW, /UPDATE.
- <QUALIFIER>
- /FULL_PATH
- /FULL_PATH (default)
- /NOFULL_PATH
- Directs Zip to store the directory part of the file names (relative to
- the current working directory) in the Zip archive. With /NOFULL_PATH,
- Zip stores only the file names, discarding any directory information.
- <QUALIFIER>
- /GROW
- /GROW
- /APPEND
- Grow (append to) the specified Zip archive, instead of creating a new
- one. If this operation fails, Zip attempts to restore the archive to
- its original state. If the restoration fails, the archive might become
- corrupted. This option is ignored when there's no existing archive or
- when at least one archive member must be updated or deleted.
- See also /DELETE, /DIFFERENCE, /FRESHEN, /UPDATE.
- <QUALIFIER>
- /HELP
- /HELP[=EXTENDED]
- Display Zip's help screen, including the version message. With
- /HELP=EXTENDED, more detailed (longer) help information is shown.
- <QUALIFIER>
- /INCLUDE
- /INCLUDE=(file[,...])
- A comma-separated list of files to include when deleting, updating, or
- adding files in the archive. If multiple files are specified, the list
- should be enclosed in parentheses.
- <QUALIFIER>
- /INLIST
- /INLIST=list_file
- The files matching the filename patterns listed in "list_file" are
- included when deleting, updating, or adding files in the archive.
- The "list_file" is a normal text file with one filename pattern entry per
- line. The name pattern entries are recognized exactly as found in
- "list_file", including leading, embedded, and trailing whitespace or most
- control characters (with exception of LineFeed and probably CarriageReturn).
- <QUALIFIER>
- /JUNK
- /JUNK
- /NOJUNK (default)
- Junk (discard) the directory part of the file names for added entries
- (do not not save the directory structure). The /JUNK qualifier is an
- alias for /NOFULL_PATH.
- <QUALIFIER>
- /KEEP_VERSION
- /KEEP_VERSION
- /NOKEEP_VERSION (default)
- Directs Zip to retain VMS file version numbers on names in an archive.
- By default, for compatibility with non-VMS systems, Zip strips VMS
- file version numbers from the names stored in an archive. Thus, without
- /DOT_VERSION or /KEEP_VERSION, a version number wildcard (";*") can
- cause errors when multiple versions of a single file are treated as
- multiple files with the same name.
- See also /DOT_VERSION.
- <QUALIFIER>
- /LATEST
- /LATEST
- The archive's creation and modification time is set to the latest
- modification time of all archive members.
- <QUALIFIER>
- /LEVEL
- /LEVEL=number
- Specifies the compression level:
- <LITERAL>
- | 0 Store
- | 1 Fastest compression (Defl:F)
- | ...
- | 9 Best compression (Defl:X)
- <LARETIL>
- The default level is 6.
- <QUALIFIER>
- /LICENSE
- /LICENSE
- Displays the Zip license.
- <QUALIFIER>
- /LOG_FILE
- /LOG_FILE=(FILE=log_file [, APPEND] [, INFORMATIONAL])
- Zip normally sends messages to the user's terminal, but these may be
- also directed to a log file.
- <LITERAL>
- FILE=log_file
- <LARETIL>
- Open a logfile at the given path. By default, a new version will be
- created.
- <LITERAL>
- APPEND
- <LARETIL>
- Append to an existing log file. Default is to create a new version.
- <LITERAL>
- INFORMATIONAL
- <LARETIL>
- Only warnings and errors are written to the log unless the INFORMATIONAL
- option is also specified, then all information messages are also written
- to the log.
- <QUALIFIER>
- /MOVE
- /MOVE
- Move the specified files into the Zip archive. That is, Zip will delete
- any files which are successfully added to or updated in the archive. No
- deletions will be done until the Zip operation has completed with no
- errors. This option is obviously dangerous and should be used with
- care, but it does reduce the need for free disk space. It's recommended
- that /TEST also be used to test the archive before the input files are
- deleted.
- <QUALIFIER>
- /MUST_MATCH
- /MUST_MATCH
- All input patterns must match at least one file and all input files
- found must be readable. Normally when an input pattern does not match
- a file the "name not matched" warning is issued and when an input
- file has been found but later is missing or not readable a "missing or
- not readable" warning is issued. In either case Zip continues
- creating the archive, with missing or unreadable new files being skipped
- and files already in the archive remaining unchanged. After the
- archive is created, if any files were not readable zip returns the OPEN
- error code (18 on most systems) instead of the normal success return (0
- on most systems). With /MUST_MATCH, Zip exits as soon as an input
- pattern is not matched (whenever the "name not matched" warning would be
- issued) or when an input file is not readable. In either case Zip exits
- with an OPEN error and no archive is created.
- This option is useful when a known list of files is to be zipped so any
- missing or unreadable files should result in an error. It may be less
- useful when used with wildcards, but Zip will still exit with an error
- if any input pattern doesn't match at least one file or if any
- matched files are unreadable. If you want to create the archive anyway
- and only need to know if files were skipped, then don't use /MUST_MATCH
- and just check the exit status. Also, a log file (see /LOG_FILE) could
- be useful.
- <QUALIFIER>
- /PATTERN_CASE
- /PATTERN_CASE={BLIND|SENSITIVE}
- <LITERAL>
- | BLIND Use case-blind pattern matching for archive entry names.
- | SENSITIVE Use case-sensitive pattern matching for archive entry
- | names. (Default.)
- <LARETIL>
- By default, on VMS, archive name pattern matching (/COPY_ENTRIES,
- /DELETE, /EXCLUDE, /INCLUDE, and /RECURSE=FILENAMES) is case sensitive,
- even when the file system is not case sensitive (or even case
- preserving). This allows accurate matching of mixed-case names in an
- archive which may have been created on a system with a case sensitive
- file system, but it can involve extra effort on VMS, where it may be
- necessary to use unnatural case names (or the same names in multiple
- cases, like "*.obj *.OBJ") for this kind of pattern matching to give the
- desired behavior. If completely case-blind pattern matching behavior is
- desired, specify the /PATTERN_CASE=BLIND option.
- <QUALIFIER>
- /PKZIP
- /PKZIP
- /NOPKZIP (default)
- Create PKZIP-compatible archive entries. File names and paths are
- adjusted to conform to MSDOS character-set and length
- limitations, to store only the MSDOS file attributes (just the
- owner:write attribute from VMS), and to mark the entry as made under
- MSDOS (even though it wasn't).
- <QUALIFIER>
- /PRESERVE_CASE
- /NOPRESERVE_CASE
- /PRESERVE_CASE[=(keyword[, ...])]
- Directs Zip to preserve the case of, or convert to lower-case, file names
- in the archive. Optional keywords are:
- <LITERAL>
- | NOODS2 Down-case ODS2 file names (default).
- | NOODS5 Down-case ODS5 file names.
- | ODS2 Preserve case of ODS2 file names.
- | ODS5 Preserve case of ODS5 file names (default).
- <LARETIL>
- By default, file names from an ODS2 file system are converted to lower
- case for storage in an archive, while the case of file names from an
- ODS5 file system is preserved.
- /NOPRESERVE_CASE is equivalent to /PRESERVE_CASE = (NOODS2, NOODS5),
- which causes all file names to be converted to lower-case. This is
- equivalent to the behavior of Zip before version 3.0.
- /PRESERVE_CASE is equivalent to /PRESERVE_CASE = (ODS2, ODS5), which
- preserves the case of all file names.
- <QUALIFIER>
- /QUIET
- /QUIET
- Quiet mode. Eliminates informational messages and comment prompts.
- This mode may be useful in command procedures, or if the Zip operation
- is being performed as a background task ("$ spawn/nowait zip /quiet foo
- *.c").
- <QUALIFIER>
- /RECURSE
- /RECURSE[=KEYWORD]
- /NORECURSE (default)
- Directs Zip to recurse into subdirectories.
- The optional keywords recognized are:
- <LITERAL>
- | PATH take patterns as full path specifiers (-r) (default)
- | FILENAMES start from current dir;
- | only use filename part of file patterns (-R)
- <LARETIL>
- The optional FILENAMES keyword modifies the recursion algorithm to be
- (almost) compatible to PKZIP's behaviour on subdirectory recursion.
- On VMS, directory recursion can also be requested by using the
- directory depth wildcard ("[...]") in an input file specification.
- <QUALIFIER>
- /SHOW
- /SHOW=(KEYWORD[,KEYWORD[...]])
- Controls various diagnostic messages.
- The keywords recognized are:
- <LITERAL>
- | COMMAND Show command line arguments as processed (only, then exit).
- | DEBUG Show Debug information.
- | FILES Show files to process (only, then exit).
- | OPTIONS Show all available command-line options on this system.
- <LARETIL>
- <QUALIFIER>
- /SINCE
- /SINCE=VMS_date_time
- Restricts the files by date-time when adding, updating, or freshening an
- archive. Only files with modification date-times at or later than the
- specified date-time are accepted.
- See also /BEFORE.
- <QUALIFIER>
- /SPLIT
- /SPLIT = (SIZE=size [, PAUSE [, BELL]] [, VERBOSE])
- Enables split archives, specifies the size of the splits, and controls
- other related behavior.
- SIZE=size specifies the split size. The size is given as a number
- followed optionally by a multiplier suffix of k (KB), m (MB, the default
- if no suffix is specified), g (GB), or t (TB). (All are powers of 1024,
- not 1000). 64K is the minimum split size. For example, the following
- command could be used to create a split archive called "foo" from the
- contents of the "bar" directory with splits of 670MB, which might be
- useful for burning on CDs:
- <LITERAL>
- | zip /split = size = 670m foo [.bar...]*.*
- <LARETIL>
- Using /SPLIT without PAUSE as above creates all the splits in the
- directory
- specified by "foo", in this case the current default directory. This
- split mode updates the splits as the archive is being created, requiring
- all splits to remain writable, but creates split archives that are
- readable by any UnZip that supports split archives. See PAUSE below for
- enabling split pause mode which allows splits to be written directly to
- removable media.
- PAUSE causes Zip to pause between splits to allow
- changing removable media, for example. PAUSE uses stream mode to
- write splits so unzips that can't read stream mode entries may not
- be able to read some entries in the archive. Unless standard encryption
- was used, copy mode using /COPY_ENTRIES can convert stream mode entries
- to normal entries.
- BELL ring the terminal bell when Zip pauses for the next split
- destination.
- VERBOSE enables verbose splitting and display details of how the
- splitting is being done.
- Though Zip does not update split archives, Zip provides the option
- /OUTPUT to allow split archives to be updated and saved in a new
- archive. For example:
- <LITERAL>
- | zip inarchive.zip foo.c bar.c /output = outarchive.zip
- <LARETIL>
- reads archive inarchive.zip, even if split, adds the files foo.c and
- bar.c, and writes the resulting archive to outarchive.zip. If
- inarchive.zip is split, then outarchive.zip defaults to the same split
- size. Be aware that outarchive.zip and any split files that are created
- with it are always overwritten without warning. This may be changed in
- the future.
- <QUALIFIER>
- /STORE_TYPES
- /STORE_TYPES=(.ext1,.ext2,... )
- Normally, a file which is already compressed will not be compressed much
- further (if at all) by Zip, and trying to do it can waste considerable
- CPU time. Zip can suppress compression on files with particular types,
- specified with /STORE_TYPES. The default list of types where
- compression is suppressed is /STORE_TYPES=(.Z, .zip, .zoo, .arc, .lzh,
- .arj), and the comparison is case-insensitive.
- /LEVEL=9 will override /STORE_TYPES, causing compression to be attempted
- for all files.
- <QUALIFIER>
- /SYMLINKS
- /SYMLINKS
- Store symbolic links as such in the Zip archive, instead of compressing
- and storing the file referred to by the link. A symbolic link normally
- requires less storage than the actual file, both in the archive, and on
- the destination file system.
- On VMS, symbolic links are supported on ODS5 disks where the C RTL
- supports symbolic links. Full support for symbolic links seems to
- require VMS V8.3, but a Zip program supporting symbolic links may be
- built on VMS V7.3-2.
- <QUALIFIER>
- /TEMP_PATH
- /TEMP_PATH=temp_dir
- When creating a new archive or normally when changing an existing
- archive, Zip will write a temporary file in the archive destination
- directory ("ZIxxxxxxxx", where "xxxxxxxx" is the hexadecimal process ID)
- with the new contents. Then, if and when the Zip job has completed with
- no errors, it will rename the temporary file to the specified archive
- name (replacing the old archive, if any).
- /TEMP_PATH=temp_dir specifies an alternate device:[directory],
- "temp_dir", for the temporary file, but specifying a different device
- will force Zip to copy the temporary file to its final destination
- instead of simply renaming it, and that copying will take more time than
- renaming, especially for a large archive. For example:
- <LITERAL>
- | zip /temp_path = disk$scratch:[tmp] stuff *
- <LARETIL>
- will cause Zip to put its temporary files in the directory
- "disk$scratch:[tmp]", copying the temporary file back to the current
- directory as stuff.zip when it's complete.
- <QUALIFIER>
- /TEST
- /TEST[=UNZIP=unzip_cmd]
- Test the integrity of a Zip archive (the new one, if /OUTPUT is
- specified). If the check fails, the old archive is unchanged and
- (with the /MOVE option) no input files are removed.
- Implementation
- "zip /TEST" actually runs an "unzip -t" command to do the testing, so
- UnZip must be installed properly for this to work.
- With UNZIP=unzip_cmd, Zip uses the UnZip command specified by
- "unzip_cmd" (normally a DCL symbol), instead of the default command,
- "unzip -t". This can be useful if multiple versions of UnZip are
- installed on a system, and the default DCL symbol "UNZIP" would run the
- wrong one (or the logical name DCL$PATH would lead to the wrong one).
- In "unzip_cmd", the string "{}" is replaced by the name of the
- (temporary) archive to be tested, otherwise the name of the archive is
- appended to the end of the command. The exit status is checked for
- success severity.
- <QUALIFIER>
- /TRANSLATE_EOL
- /TRANSLATE_EOL[=KEYWORD]
- Selects conversion of the end-of-line markers in text files. This
- option should be used on text files only. The optional keywords
- recognized are:
- <LITERAL>
- | LF convert LF -> CRLF (UNIX to DOS) (default)
- | CRLF convert CRLF -> LF, strip trailing CTRL-Z's (DOS to UNIX)
- <LARETIL>
- The CRLF option may be useful when a DOS text file has been transfered
- to a VMS disk in stream (or stream_lf) format.
- <QUALIFIER>
- /UNSFX
- /UNSFX
- Strip any prepended data from the Zip archive. ZIP /UNSFX is normally
- used to convert a self-extracting archive to a normal archive by
- removing the UnZip SFX executable from the beginning of the SFX archive.
- Note that a self-extracting archive contains a normal Zip archive, and a
- normal UnZip program can be used to expand it in the normal way. You
- may get a warning about extra bytes at the beginning of the archive (the
- UnZip SFX program), but UnZip should work properly after that. This
- allows data in a self-extracting archive to be accessed on any system,
- not just the target system where its embedded UnZip SFX program runs.
- <QUALIFIER>
- /UPDATE
- /UPDATE
- Update existing archive entries and add new files. If the archive does
- not exist, create it. This is the default mode, so /UPDATE is optional.
- See also /DELETE /DIFFERENCE, /GROW, /FRESHEN.
- <QUALIFIER>
- /VERBOSE
- /VERBOSE[=NORMAL|MORE|DEBUG] [, COMMAND]]
- Verbose mode or print diagnostic version info.
- Normally, when applied to real operations, this option enables the
- display of a progress indicator during compression (see /DISPLAY=DOTS
- for more on dots) and requests verbose diagnostic info about archive
- structure oddities.
- /VERBOSE with no value is equivalent to /VERBOSE=NORMAL. MORE adds more
- messages, and DEBUG adds still more messages.
- When /VERBOSE is the only command line argument, a diagnostic report is
- displayed, showing:
- <LITERAL>
- | o Copyright and other legal notices
- | o Program name, version, and release date
- | o Pointers to Info-ZIP FTP and Web sites
- | o Program build information (compiler type and version, OS version,
- | and the compilation date
- | o Optional features enabled at compile-time
- | o Environment variable definitions (ZIP_OPTS, ZIPOPT)
- <LARETIL>
- This information should be included in bug reports.
- /VERBOSE=COMMAND causes Zip to display the UNIX-style command-line
- argument vector which is generated from the VMS-style CLI command line
- before executing the command. This is of primary interest to program
- developers debugging the CLI.
- <QUALIFIER>
- /VMS
- /VMS[=ALL]
- The /VMS and /VMS=ALL options cause Zip to store VMS file atributes
- (such as file organization, record format, carriage control, and so on)
- in VMS-specific "extra fields" in an archive along with the usual data.
- These extra fields are ignored on non-VMS systems, but on a VMS system,
- they allow UnZip to restore the files with their VMS attributes intact.
- With /VMS, Zip ignores any data in the file after the end-of-file (EOF)
- point (defined by FAT$L_EFBLK and FAT$W_FFBYTE), which works well for
- well-formed files (that is, those with no valid data beyond EOF).
- Portable-format files (Stream_LF, fixed-512) archived with /VMS should
- be extracted properly on a non-VMS system. Files with more complex
- structures, such as indexed files and files with embedded byte counts or
- other such data may be of limited use on other systems. (UnZip on
- non-VMS systems may be able to extract various VMS-format text files,
- however.)
- With /VMS=ALL, Zip processes all allocated blocks for the file
- (including those beyond EOF). When extracted on a VMS system, the
- original file should be reproduced with as much fidelity as possible,
- but on a non-VMS system, most files will be seen as corrupt because of
- the data from beyond EOF.
- <QUALIFIER>
- /WILDCARD
- <LITERAL>
- /NOWILDCARD
- /WILDCARD=NOSPAN
- <LARETIL>
- Controls wildcard processing.
- /NOWILDCARD Wildcard processing is disabled.
- /WILDCARD=NOSPAN Wildcards don't span directory boundaries in paths.
- <QUALIFIER>
- /ZIP64
- /ZIP64
- Forces use of Zip64 archive format, even for small files. This is
- mainly for testing and should never be used. Zip will automatically
- use Zip64 as needed without this option.
- <TOPIC>
- UNIX_Options
- "zip -h" provides a concise list of common command-line options. "zip
- -h2" provides more details. "zip -so" provides a list of all available
- options. "zip -v" shows the program version and available features.
- (The list below was derived from a "zip -so" listing.)
- Short-form options begin with a single hyphen ("-"). Long-form option
- begin with a double hyphen ("--"), and may be abbreviated to any
- unambiguous shorter string. For example:
- <LITERAL>
- | -v
- | --verbose
- | --verb
- <LARETIL>
- To avoid confusion, if a negatable option contains an embedded hyphen
- ("-"), then avoid abbreviating it at the hyphen if you plan to negate
- it. For example, if an option like --some-option were abbreviated to
- --some-, the parser would consider that trailing hyphen to be part of
- the option name, rather than as a negating trailing hyphen. This
- behavior may change in the future, to interpret the trailing hyphen in
- --some- to be negating. (So don't do it.)
- Some options may be negated (or modified) by appending a "-":
- <LITERAL>
- | -la-
- | --show-files-
- <LARETIL>
- Some options take a value, which may immediately follow the option, or
- be separated by a space or "=". For example:
- <LITERAL>
- | -ttmmddyyyy
- | -tt mmddyyyy
- | -tt=mmddyyyy
- <LARETIL>
- <LITERAL0>
- | Sh Long Description
- |----+-------------------+------------------------------------------------
- | 0 store store (instead of compress)
- | 1 compress-1 compress faster (-2, -3, -4, ...)
- | 9 compress-9 compress better
- | ? show the Zip help screen
- | @ names-stdin read input file patterns from SYS$INPUT (1/line)
- | A adjust-sfx adjust self-extracting executable
- | b temp-path path use "path" directory for temporary files
- | C preserve-case preserve case of all file names added to archive
- | C- preserve-case- down-case all file names added to archive
- | C2 preserve-case-2 preserve case of ODS2 names added to archive
- | C2- preserve-case-2- down-case ODS2 file added to archive (default)
- | C5 preserve-case-5 preserve case of ODS5 names added to arcv (dflt)
- | C5- preserve-case-5- down-case ODS5 names added to archive
- | c entry-comments add a comment for each entry added to archive
- | D no-dir-entries do not add archive entries for directories
- | DF difference-archive difference archive: add only changed/new files
- | d delete delete entries in archive
- | db display-bytes display running byte counts
- | dc display-counts display running file counts
- | dd display-dots display progress dots for files (dflt sz = 10MB)
- | dg display-globaldots display progress dots for archive, not each file
- | ds dot-size size set progress dot interval to "size" (MB)
- | du display-usize display original uncompressed size for entries
- | dv display-volume display volume (disk) number as in_disk>out_disk
- | e encrypt encrypt entries, ask for password
- | F fix fix mostly intact archive (try F before FF)
- | FF fixfix salvage what can be salvaged (not as reliable)
- | FS filesync remove archive entries unmatched in file system
- | f freshen update existing entries (only changed files)
- | fd force-descriptors force data descriptors as if streaming
- | fz force-zip64 force use of Zip64 format
- | g grow grow existing archive (unless update or delete)
- | H show the Zip help screen
- | h help show the Zip help screen
- | h2 more-help show extended Zip help
- | i include pat1 [pat2 [...]] include only names matching the patterns
- | J junk-sfx junk (remove) archive preamble (unzipsfx)
- | j junk-paths junk (don't store) dir names, only file names
- | k DOS-names simulate PKZIP-made archive (DOS 8.3 names)
- | L license show software license
- | l to-crlf translate end-of-lines (LF -> CRLF)
- | la log-append append to existing log file
- | lf logfile-path lfile log to log file at lfile (default: new version)
- | li log-info include informational messages in log
- | ll from-crlf translate end-of-lines (CRLF -> LF)
- | MM must-match input file spec must exist (wildcrds must match)
- | m move delete files added to archive
- | n suffixes sfx1[:sfx2[...]] don't compress files with these suffixes
- | nw no-wild no wildcards during add or update
- | O output-file ozf use "ozf" as the output archive (dflt = inp archv)
- | o latest-time set archive date-time to match oldest entry
- | P password password encrypt with supplied "password" string
- | q quiet quiet operation (no info messages)
- | R recurse-patterns recurse subdirs from cur dir, match names only
- | r recurse-paths recurse directories from specified path pats
- | s split-size size split archive at "size" (K/MB) (0: don't split)
- | sb split-bell ring termnl bell at pause for split medium chng
- | sc show-command show command line
- | sd show-debug show debug messages
- | sf show-files show files to process (only)
- | so show-options show list of all command-line options
- | sp split-pause pause to select split destination(s)
- | sv split-verbose be verbose about creating splits
- | T test test archive integrity (runs UnZip -T)
- | t from-date mmddyyyy only do files since (at or after) "mmddyyyy"
- | tt before-date mmddyyyy only do files before "mmddyyyy"
- | u update update changed files, add new files (default)
- | V VMS-portable save VMS file attributes
- | VV VMS-specific save VMS file attributes and all allocated blks
- | v verbose verbose messages (version info if only arg)
- | w VMS-versions save VMS version numbers in archive
- | ww VMS-dot-versions save VMS version numbers as ".nnn", not ";nnn"
- | X strip-extra strip all but critical extra fields
- | X- strip-extra- keep all extra fields
- | x exclude pat1 [pat2 [...]] exclude all names matching the patterns
- | Z compression-method mthd use cmprs method "mthd" (bzip2 or deflate)
- | z archive-comment ask for archive comment
- <0LARETIL>
- With SET PROCESS /PARSE_STYLE = EXTENDED (available on recent non-VAX
- systems), Zip preserves the case of the command line. Otherwise, mixed-
- or upper-case options and arguments must be quoted. For example,
- "-V". Examples in this document generally do not show this quotation.
- <TOPIC>
- Copyright_and_License
- Zip has an option to display its copyright and license.
- <LITERAL>
- | /LICENSE
- <LARETIL>
- The license is reproduced below.
- This is version 2007-Mar-4 of the Info-ZIP license. The definitive
- version of this document should be available at
- ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and a copy
- at http://www.info-zip.org/pub/infozip/license.html.
- --------------------------------------------------------
- <LITERAL0>
- |Copyright (c) 1990-2007 Info-ZIP. All rights reserved.
- |
- |For the purposes of this copyright and license, "Info-ZIP" is defined as
- |the following set of individuals:
- |
- |Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,
- |Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth,
- |Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz,
- |David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko,
- |Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs,
- |Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda,
- |Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren,
- |Rich Wales, Mike White.
- |
- |This software is provided "as is," without warranty of any kind, express
- |or implied. In no event shall Info-ZIP or its contributors be held
- |liable for any direct, indirect, incidental, special or consequential
- |damages arising out of the use of or inability to use this software.
- |
- |Permission is granted to anyone to use this software for any purpose,
- |including commercial applications, and to alter it and redistribute it
- |freely, subject to the above disclaimer and the following restrictions:
- |
- |1. Redistributions of source code (in whole or in part) must retain
- | the above copyright notice, definition, disclaimer, and this list
- | of conditions.
- |
- |2. Redistributions in binary form (compiled executables and libraries)
- | must reproduce the above copyright notice, definition, disclaimer,
- | and this list of conditions in documentation and/or other materials
- | provided with the distribution. The sole exception to this condition
- | is redistribution of a standard UnZipSFX binary (including SFXWiz) as
- | part of a self-extracting archive; that is permitted without inclusion
- | of this license, as long as the normal SFX banner has not been removed
- | from the binary or disabled.
- |
- |3. Altered versions -- including, but not limited to, ports to new
- | operating systems, existing ports with new graphical interfaces,
- | versions with modified or added functionality, and dynamic, shared,
- | or static library versions not from Info-ZIP -- must be plainly marked
- | as such and must not be misrepresented as being the original source
- | or, if binaries, compiled from the original source. Such altered
- | versions also must not be misrepresented as being Info-ZIP releases --
- | including, but not limited to, labeling of the altered versions with
- | the names "Info-ZIP" (or any variation thereof, including, but not
- | limited to, different capitalizations), "Pocket UnZip," "WiZ" or
- | "MacZip" without the explicit permission of Info-ZIP. Such altered
- | versions are further prohibited from misrepresentative use of the
- | Zip-Bugs or Info-ZIP e-mail addresses or the Info-ZIP URL(s), such as
- | to imply Info-ZIP will provide support for the altered versions.
- |
- |4. Info-ZIP retains the right to use the names "Info-ZIP", "Zip",
- | "UnZip", "UnZipSFX", "WiZ", "Pocket UnZip", "Pocket Zip", and
- | "MacZip" for its own source and binary releases.
- <0LARETIL>
- ===
|