Archive-Unzip-Burst
view release on metacpan or search on metacpan
unzip-6.0/vms/unzip_def.rnh view on Meta::CPAN
.sk
Archive member extraction is implied by the absence of the -c, -p, -t, -l, -v or
-z options. All archive members are processed unless a filespec is provided to
specify a subset of the archive members.
Format:
.sk;.lm+1;.literal
UNZIP [-cfhlptTuvxz[ajnoqCDLMSVXY:2]] file[.zip] [list] [-x xlist] [-d out_dir]
.end literal;.lm-1
.!------------------------------------------------------------------------------
.indent -4
2 Parameters
.sk;.indent -4
file[.zip]
.sk
File specification for the ZIP archive(s) with optional wildcards. UnZip will
perform actions specified for every zipfile matching the specification.
Default file specification is SYS$DISK:[].ZIP.
Note that self-extracting ZIP files are supported; just specify the .EXE
suffix yourself.
.sk;.indent -4
[list]
.sk
An optional list of archive members to be processed; if no list is given, all
archive members are processed. Expressions may be
used to match multiple members. Expressions should be enclosed in double-quotes
to prevent interpretation by DCL. Multiple filenames should be separated by
blanks. Each file specification is similar to a Unix egrep expression and may
contain:
.sk
.literal
* matches a sequence of 0 or more characters
? matches exactly 1 character
[...] matches any single character found inside the brackets;
ranges are specified by a beginning character, a hyphen,
and an ending character. If a '!' or '^' immediately
follows the left bracket, then any character not in the
given range is matched.
Hint: To specify a verbatim left bracket '[', the
three-character sequence "[[]" has to be used.
.end literal
.sk
.sk;.indent -4
[-x xlist]
.sk
An optional list of archive members to be excluded from processing. The xlist
overrides any files included in the normal list.
.sk;.indent -4
[-d out_dir]
.sk
Optional directory specification to be used as target root directory
for files to be extracted. Directory should be specified in "[.foo]"
format rather than "foo.dir" or "foo/" format.
.!------------------------------------------------------------------------------
.indent -4
2 Options
.br
The default action of UnZip is to extract all zipfile entries. The following
options and modifiers can be provided:
.sk;.literal
-Z ZipInfo mode
-c extract files to SYS$OUTPUT (terminal)
-f freshen existing files (replace if newer); create none
-h show brief help screen and exit quietly
-l list archive files (short format)
-p extract files to SYS$OUTPUT; no informational messages
-t test archive files
-T set zipfile timestamps to that of each archive's newest entry
-u update existing files; create new ones if needed
-v list archive files (verbose format)
-z display only the archive comment
.end literal;.sk;.literal
MODIFIERS
-a extract text files in standard VMS text file format
-aa extract all files as text
-b auto-extract only binary files in fixed 512-byte record format
-bb extract all files as binary in fixed 512-byte record format
-j junk paths (don't recreate archive's directory structure)
-n never overwrite or make a new version of an existing file
-o always make a new version (-oo: overwrite orig) existing file
-q perform operations quietly (-qq => even quieter)
-C match filenames case-insensitively
-D do not restore any timestamps (--D restore them even for dirs)
-L convert filenames to lowercase if created under DOS, VMS, etc.
-M feed screen output through built-in "more" pager
-P<password> supply decryption password on the cmd line (insecure!)
-S use Stream_LF record format to extract text files (with -a[a])
-V retain (VMS) file version numbers
-X restore owner/ACL protection info (may require privileges)
-Y treat ".nnn" suffix as version number ("a.b.3" -> "a.b;3")
-: allow "../" path components to traverse across top extract dir
-2 force creation of ODS2-compatible file names
.end literal;.sk
Note that uppercase options (-C, -D, -L, -M, -P, -S, -T, -V, -X, -Y, and
-Z) must be specified in quotes (unless SET PROC/PARSE=EXTEND is set).
For example:
.sk;.literal
unzip "-VX" -a zipfile
.end literal;.sk
When extracting to SYS$OUTPUT (-c or -p options) redirected to a file,
you may want to override the default text file conversion by specifying
the -b option. A single "-b" option switches to "binary piping" mode
for Zip entries marked as non-text, only. To force "binary piping" mode
even for Zip file entries marked as text, the "-bb" option should be used.
(Please note that a later "-a" cancels any -b option, see below.)
.sk
The output conversion options -b and -a may be combined to perform
binary conversions on binary files and text conversion on text files.
But note: For compatibility with implementation on other systems, -b cancels
any -a option; to get the intended result, -a must be specified AFTER -b.
And, in combination, "text" recognition takes precedence; this means
that -bba (-bb -a) has the same effect as -ba (-b -a), and -aa overrides
binary conversion for ALL files.
.sk
The conversion option -S is only effective when used together with
-a or -aa. When specified, "text" files are written in Stream-LF record
format instead of the VMS default of Variable-Length record format.
(When no conversion options are specified, all non-VMS entries are always
written as Stream-LF files.)
.sk
Please note that using the "-P<password>" option is higly insecure, the
plaintext password may be seen by others. For this reason (and because of
lack of space), the "-P<password>" option is not advertised on UnZip's
online help screen.
.!------------------------------------------------------------------------------
.indent -4
2 Exit_Status
.br
On VMS, UnZip's UNIX-style exit values are mapped into VMS-style status
codes with facility code 1954 = %x7A2, and with the inhibit-message
(%x10000000) and facility-specific (%x00008000) bits set:
.sk
.literal
%x17A28001 normal exit
%x17A28000 + 16*UnZip_error_code warnings
%x17A28002 + 16*UnZip_error_code normal errors
%x17A28004 + 16*UnZip_error_code fatal errors
.end literal
.sk
Note that multiplying the UNIX-style UnZip error code by 16 places it
conveniently in the hexadecimal representation of the VMS exit code,
"__" in %x17A28__s, where "s" is the severity code. For example, a
missing archive might cause UnZip error code 9, which would be
transformed into the VMS exit status %X17A28092.
.sk
The UnZip VMS exit codes include severity values which approximate those
defined by PKWARE, as shown in the following table:
.literal
VMS UnZip err
severity code Error description
----------+---------+----------------------------------------------
Success 0 Normal. No errors or warnings detected.
Warning 1 One or more warnings were encountered, but
processing completed successfully anyway.
This includes archives where one or more
(but not all) files were skipped because of
unsupported compress or encrypt methods, or
bad passwords.
Error 2 Error in the archive format. Processing may
( run in 0.654 second using v1.01-cache-2.11-cpan-5735350b133 )