~ubuntu-branches/ubuntu/lucid/unzip/lucid-security

« back to all changes in this revision

Viewing changes to vms/unzip_cli.help

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2009-05-08 20:02:40 UTC
  • mfrom: (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20090508200240-7l4gypruop5863bd
* New upstream release. Closes: #496989.
* Enabled new Unicode support. Closes: #197427. This may or may not work
  for your already created zipfiles, but it's not a bug unless they were
  created using the Unicode feature present in zip 3.0.
* Built using DATE_FORMAT=DF_YMD so that unzip -l show dates in ISO format,
  as that's the only available one which makes sense. Closes: #312886.
* Enabled new bzip2 support. Closes: #426798.
* Exit code for zipgrep should now be the right one. Closes: #441997.
* The reason why a file may not be created is now shown. Closes: #478791.
* Summary of changes in this version not being the debian/* files:
- Manpages in section 1, not 1L.
- Branding patch. UnZip by Debian. Original by Info-ZIP.
- Always #include <unistd.h>. Debian GNU/kFreeBSD needs it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
.!              Added /[NO]CASE_INSENSITIVE to ZipInfo mode;
35
35
.!              documented the new /PASSWORD="decryption_key" option.
36
36
.!      02-007          Christian Spieler       22-JUL-1997 22:37
37
 
.!              Formatting changes (prevent line wraps); added "Exit_Codes"
38
 
.!              subtopic (no version number change).
 
37
.!              Formatting changes (prevent line wraps);
 
38
.!              added "Exit_Codes" subtopic (no version number change).
39
39
.!      02-007          Christian Spieler       28-APR-2000 03:22
40
40
.!              Changed references to plaintext UnZip documentation file
41
41
.!              into UNZIP.TXT (no version number change).
50
50
.!              Added /TIMESTAMP (-T) qualifier.
51
51
.!      02-010          Christian Spieler       29-Jan-2005 01:50
52
52
.!              Completed description of -T qualifier (also for UNIX style).
 
53
.!      02-011          Steven Schweda          14-FEB-2005 20:04
 
54
.!              Added /DOT_VERSION (-Y) and /ODS2 (-2) qualifiers.
 
55
.!      02-012          Steven Schweda          07-JUL-2006 01:30
 
56
.!              Added /TEXT = STMLF (-s) qualifier.
 
57
.!      02-012          Christian Spieler       04-Mar-2007 14:39
 
58
.!              Changed -s qualifier into -S;
 
59
.!              updated documentation of UnZip's exit codes.
 
60
.!      03-002          S. Schweda, C. Spieler  09-Jan-2008 03:35
 
61
.!              Added documentation of extended /RESTORE=(...) qualifier.
 
62
.!      03-003          S. Schweda, C. Spieler  13-Sep-2008 20:00
 
63
.!              Added /EXISTING qualifier.
53
64
.!
54
65
<INIT>
55
66
<MAIN>
191
202
Specifies the output directory where all the extracted files are to be
192
203
placed.
193
204
<QUALIFIER>
 
205
/DOT_VERSION
 
206
 
 
207
/DOT_VERSION
 
208
<NEXT>
 
209
/NODOT_VERSION (default)
 
210
 
 
211
Causes UnZip to treat archived file name endings of ".nnn" (where "nnn"
 
212
is a decimal number) as if they were VMS version numbers (";nnn").  (The
 
213
default is to treat them as file types.)  Example: "a.b.3" -> "a.b;3".
 
214
<QUALIFIER>
194
215
/EXCLUDE
195
216
 
196
217
/EXCLUDE=(file[,...])
198
219
A comma-separated list of files to exclude when extracting files.
199
220
If multiple files are specified, the list should be included in
200
221
parentheses.
201
 
 
 
222
<QUALIFIER>
 
223
/EXISTING
 
224
 
 
225
/EXISTING = keyword
 
226
 
 
227
Valid keywords (exactly one must be specified) are:
 
228
<LITERAL>
 
229
|  NEW_VERSION   Create a new version of an existing file.
 
230
|  OVERWRITE     Overwrite the same version of an existing file.
 
231
|                (But only if the archive member name includes a
 
232
|                version number.)
 
233
|  NOEXTRACT     Do not extract.  An existing file is not affected.
 
234
<LARETIL>
 
235
 
 
236
When UnZip would extract an archive member, but the destination file
 
237
already exists, UnZip will, by default, ask the user what to do.
 
238
/EXISTING lets the user specify on the command line what to do in this
 
239
situation, eliminating the interactive question(s).
 
240
 
 
241
NOEXTRACT will always stop UnZip from extracting an archive member if
 
242
the destination file already exists.
 
243
 
 
244
If an archive member name does not include a VMS version number, or if
 
245
UnZip is run with /NOVERSION (the default, causing it to ignore version
 
246
numbers), then either NEW_VERSION or OVERWRITE will cause UnZip to
 
247
create a new version of the existing file.
 
248
 
 
249
If an archive member name does include a VMS version number, and if
 
250
UnZip is run with /VERSION, then NEW_VERSION will cause UnZip to create
 
251
a new version of the existing file, and OVERWRITE will cause UnZip to
 
252
overwrite the existing file which has the version specified by the
 
253
archive member name.
202
254
<QUALIFIER>
203
255
/FRESHEN
204
256
 
249
301
Convert filenames from all-uppercase operating systems to lowercase.  This
250
302
option has no effect under VMS.
251
303
<QUALIFIER>
 
304
/ODS2
 
305
 
 
306
/ODS2
 
307
<NEXT>
 
308
/NOODS2 (default)
 
309
 
 
310
Causes UnZip to convert archived file names to ODS2-compatible file
 
311
names (substituting "_" for any invalid characters), regardless of the
 
312
type of the destination file system.
 
313
 
 
314
The default is to use ODS5-compatible file names when the destination
 
315
file system is ODS5, and to convert the names to ODS2-compatible names
 
316
when the destination file system is ODS2.
 
317
 
 
318
Beginning in UnZip 6.0, ODS2-compatible names are explicitly set to
 
319
upper case.
 
320
<QUALIFIER>
252
321
/OVERWRITE
253
322
 
254
323
/OVERWRITE
255
324
<NEXT>
256
325
/NOOVERWRITE
257
326
 
258
 
The qualifier /OVERWRITE forces overwriting of existing files when extracting.
259
 
The negation /NOOVERWRITE results in never overwriting an existing file.
260
 
The default action is to prompt for desired action when about to
261
 
overwrite an existing file.
 
327
See /EXISTING.
262
328
 
263
 
For VMS, "overwriting" results in the creation of a new version of the file,
264
 
unless version numbers are stored in the archive and /VERSION is specified.
 
329
/OVERWRITE is equivalent to /EXISTING = NEW_VERSION.
 
330
<NEXT>
 
331
/NOOVERWRITE is equivalent to /EXISTING = NOEXTRACT.
265
332
<QUALIFIER>
266
333
/PAGE
267
334
 
295
362
<QUALIFIER>
296
363
/RESTORE
297
364
 
298
 
/RESTORE
299
 
<NEXT>
300
 
/NORESTORE
301
 
 
302
 
Restore file owner and protection settings.
 
365
/RESTORE[=(KEYWORD, ...)]
 
366
 
 
367
Selects restoration options for some meta-data.
 
368
The optional keywords recognized are:
 
369
<LITERAL>
 
370
|  OWNER_PROT    Restore file owner and ACL protection settings.
 
371
|  NOOWNER_PROT  Do not restore file owner and ACL protection settings.
 
372
|  NODATE        Do not restore any timestamps.
 
373
|  DATE=ALL      Restore timestamps for all extracted entries, files
 
374
|                and directories.
 
375
|  DATE=FILES    Restore timestamps for extracted files.  (default)
 
376
<LARETIL>
 
377
 
 
378
By default, VMS UnZip restores the original date-time attributes for files,
 
379
but not for directories.  This agrees with the behavior of VMS BACKUP
 
380
(and UnZip versions before 5.52 where the capability to restore directory
 
381
timestamps was added).
 
382
 
 
383
For compatibility with UnZip versions before 6.0 (5.53), the following
 
384
obsolete short forms are still accepted:
 
385
<LITERAL>
 
386
| Obsolete form:        Modern form:
 
387
| /RESTORE              /RESTORE = OWNER_PROT
 
388
| /NORESTORE            /RESTORE = NOOWNER_PROT
 
389
<LARETIL>
303
390
<QUALIFIER>
304
391
/SCREEN
305
392
 
319
406
<QUALIFIER>
320
407
/TEXT
321
408
 
322
 
/TEXT[=KEYWORD]
 
409
/TEXT[=(KEYWORD, ...)]
323
410
<NEXT>
324
411
/NOTEXT (default)
325
412
 
330
417
|           than "binary") in standard VMS text file format. (default)
331
418
|  ALL      Extracts all files in standard VMS text file format.
332
419
|  NONE     Same as /NOTEXT.
 
420
|  STMLF    Use Stream_LF record format for text files (instead of the
 
421
|           default variable-length record format).
333
422
<LARETIL>
334
423
 
335
424
A similar functionality is available for binary files, see qualifier /BINARY.
384
473
VMS on-line help ported from UNZIP.TXT by Hunter Goatley.
385
474
 
386
475
<TOPIC>
387
 
Exit_Codes
388
 
 
389
 
On VMS, UnZip's UNIX style exit values are mapped into proper
390
 
VMS status codes:
391
 
<LITERAL>
392
 
|   1                               (success)  normal exit,
393
 
|   (0x7fff0000 + 16*UnZip_errnum)  -W- warnings
394
 
|   (0x7fff0002 + 16*UnZip_errnum)  -E- normal errors
395
 
|   (0x7fff0004 + 16*UnZip_errnum)  -F- fatal errors
396
 
<LARETIL>
397
 
 
398
 
The UnZip error level (or exit code) approximates the exit
399
 
codes defined by PKWARE and takes on the following values:
400
 
<LITERAL>
401
 
|  VMS       UnZip    Type of error
402
 
|  severity  errcode
403
 
|    -         0      normal; no errors or warnings detected.
404
 
|
405
 
|    W         1      one or more warning errors were encountered,
406
 
|                     but processing completed  successfully  any-
407
 
|                     way.   This  includes  zipfiles where one or
408
 
|                     more files was skipped  due  to  unsupported
409
 
|                     compression  method  or  encryption  with an
410
 
|                     unknown password.
411
 
|
412
 
|    E         2      a generic error in the  zipfile  format  was
413
 
|                     detected.   Processing  may  have  completed
414
 
|                     successfully anyway;  some  broken  zipfiles
415
 
|                     created by other archivers have simple work-
416
 
|                     arounds.
417
 
|
418
 
|    F         3      a severe error in  the  zipfile  format  was
419
 
|                     detected.   Processing probably failed imme-
420
 
|                     diately.
421
 
|
422
 
|    F         4      unzip was unable to allocate memory for  one
423
 
|                     or  more  buffers during program initializa-
424
 
|                     tion.
425
 
|
426
 
|    F         5      unzip  was  unable  to  allocate  memory  or
427
 
|                     unable  to  obtain a tty to read the decryp-
428
 
|                     tion password(s).
429
 
|
430
 
|    F         6      unzip was unable to allocate  memory  during
431
 
|                     decompression to disk.
432
 
|
433
 
|    F         7      unzip  was  unable to allocate memory during
434
 
|                     in-memory decompression.
435
 
|
436
 
|    F         8      [currently not used]
437
 
|
438
 
|    E         9      the specified zipfiles were not found.
439
 
|
440
 
|    E         10     invalid options were specified on  the  com-
441
 
|                     mand line.
442
 
|
443
 
|    E         11     no matching files were found.
444
 
|
445
 
|    F         50     the disk is (or was) full during extraction.
446
 
|
447
 
|    F         51     the end of the ZIP archive  was  encountered
448
 
|                     prematurely.
449
 
|
450
 
|    E         80     the user aborted unzip prematurely with con-
451
 
|                     trol-C (or similar)
452
 
|
453
 
|    E         81     no files were found due to unsupported  com-
454
 
|                     pression  methods or unsupported decryption.
455
 
|                     (If even one additional file is successfully
456
 
|                     processed, however, the exit status is 1.)
457
 
|
458
 
|    E         82     no  files  were  found due to bad decryption
459
 
|                     password(s).  This is also the  exit  status
460
 
|                     if  no files were found due to a combination
461
 
|                     of unsupported  compression  and  bad  pass-
462
 
|                     words.   As in the previous case, however, a
463
 
|                     single successful file  will  result  in  an
464
 
|                     exit status of 1 instead.)
465
 
<LARETIL>
466
 
 
467
 
In addition, there is a compilation option to expand upon this behavior:
468
 
An executable compiled with the option RETURN_CODES defined displays
469
 
a human-readable explanation of what the error status means.
 
476
Exit_Status
 
477
 
 
478
On VMS, UnZip's UNIX-style exit values are mapped into VMS-style status
 
479
codes with facility code 1954 = %x7A2, and with the inhibit-message
 
480
(%x10000000) and facility-specific (%x00008000) bits set:
 
481
<LITERAL>
 
482
|   %x17A28001                        normal exit
 
483
|   %x17A28000 + 16*UnZip_error_code  warnings
 
484
|   %x17A28002 + 16*UnZip_error_code  normal errors
 
485
|   %x17A28004 + 16*UnZip_error_code  fatal errors
 
486
<LARETIL>
 
487
 
 
488
Note that multiplying the UNIX-style UnZip error code by 16 places it
 
489
conveniently in the hexadecimal representation of the VMS exit code,
 
490
"__" in %x17A28__s, where "s" is the severity code.  For example, a
 
491
missing archive might cause UnZip error code 9, which would be
 
492
transformed into the VMS exit status %X17A28092.
 
493
 
 
494
The UnZip VMS exit codes include severity values which approximate those
 
495
defined by PKWARE, as shown in the following table:
 
496
<LITERAL>
 
497
|    VMS     UnZip err
 
498
|  severity    code     Error description
 
499
| ----------+---------+----------------------------------------------
 
500
|  Success       0      Normal.  No errors or warnings detected.
 
501
|  Warning       1      One or more warnings  were  encountered, but
 
502
|                       processing  completed  successfully  anyway.
 
503
|                       This  includes  archives  where  one or more
 
504
|                       (but not all)  files were skipped because of
 
505
|                       unsupported compress or encrypt methods,  or
 
506
|                       bad passwords.
 
507
|  Error         2      Error in the archive format.  Processing may
 
508
|                       have completed  successfully  anyway.   Some
 
509
|                       defects in archives (made by other programs)
 
510
|                       can be repaired transparently.
 
511
|  Fatal         3      Severe error in the archive format. Process-
 
512
|                       ing probably failed immediately.
 
513
|  Fatal         4      Memory allocation failed in program initial-
 
514
|                       ization.
 
515
|  Fatal         5      Memory  allocation  failed  in password pro-
 
516
|                       cessing.
 
517
|  Fatal         6      Memory allocation failed while decompressing
 
518
|                       to disk.
 
519
|  Fatal         7      Memory allocation failed while decompressing
 
520
|                       in memory.
 
521
|  Fatal         8      Memory  allocation  failed    (reserved  for
 
522
|                       future use).
 
523
|  Error         9      Specified archive files were not found.
 
524
|  Error        10      Invalid command-line options or parameters.
 
525
|  Error        11      No files matched selection criteria.
 
526
|  Fatal        50      Disk full.
 
527
|  Fatal        51      Unexpected  end-of-file  while  reading  the
 
528
|                       archive.
 
529
|  Error        80      User interrupt (Ctrl/C).
 
530
|  Error        81      No files were processed,  because  of unsup-
 
531
|                       ported compress or encrypt methods.
 
532
|  Error        82      No  files  were  processed,  because  of bad
 
533
|                       password(s).
 
534
|  Fatal        83      Large-file archive could not be processed by
 
535
|                       this small-file program.
 
536
<LARETIL>
470
537
 
471
538
<TOPIC>
472
539
UNIX_Options
488
555
|  -z   display only the archive comment
489
556
|
490
557
|MODIFIERS
491
 
|  -a   auto-extract only text files in standard VMS text file format
 
558
|  -a   extract text files in standard VMS text file format
492
559
|  -aa  extract all files as text
493
 
|  -b   auto-extract only binary files in VMS fixed 512 bytes records
494
 
|  -bb  extract all files as binary VMS fixed 512 byte record files
 
560
|  -b   auto-extract only binary files in fixed 512-byte record format
 
561
|  -bb  extract all files as binary in fixed 512-byte record format
495
562
|  -j   junk paths (don't recreate archive's directory structure)
496
 
|  -n   never overwrite existing files; don't prompt
497
 
|  -o   OK to overwrite files without prompting
 
563
|  -n   never overwrite or make a new version of an existing file
 
564
|  -o   always make a new version (-oo: overwrite orig) existing file
498
565
|  -q   perform operations quietly (-qq => even quieter)
499
566
|  -C   match filenames case-insensitively
500
 
|  -L   convert filenames to lowercase if created on MSDOS, VMS, etc.
501
 
|  -P<pwd>  supply decryption password on the command line (insecure!)
502
 
|  -M   page output through built-in "more" function
 
567
|  -D   do not restore any timestamps (--D restore them even for dirs)
 
568
|  -L   convert filenames to lowercase if created under DOS, VMS, etc.
 
569
|  -M   feed screen output through built-in "more" pager
 
570
|  -P<password> supply decryption password on the cmd line (insecure!)
 
571
|  -S   use Stream_LF record format to extract text files (with -a[a])
503
572
|  -V   retain (VMS) file version numbers
504
 
|  -X   restore owner/protection info (may require privileges)
505
 
|  -:   allow "../" path components that traverse across extract dir root
 
573
|  -X   restore owner/ACL protection info (may require privileges)
 
574
|  -Y   treat ".nnn" suffix as version number ("a.b.3" -> "a.b;3")
 
575
|  -:   allow "../" path components to traverse across top extract dir
 
576
|  -2   force creation of ODS2-compatible file names
506
577
<LARETIL>
507
578
 
508
 
Note that uppercase options such as -C, -L, -M, -P, -T, -V, -X and -Z
509
 
must be specified in quotes.  For example:
 
579
Note that uppercase options such as -C, -D, -L, -M, -P, -S, -T, -V, -X, -Y,
 
580
and -Z must be specified in quotes (unless SET PROC/PARSE=EXTEND is set).
 
581
For example:
510
582
 
511
583
<LITERAL>
512
584
|  $ unzip "-VX" -a zipfile