~peter-pearse/ubuntu/natty/unzip/prop001

« back to all changes in this revision

Viewing changes to man/unzip.1

  • 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:
1
 
.\"  Copyright (c) 1990-2005 Info-ZIP.  All rights reserved.
 
1
.\"  Copyright (c) 1990-2009 Info-ZIP.  All rights reserved.
2
2
.\"
3
 
.\"  See the accompanying file LICENSE, version 2000-Apr-09 or later
 
3
.\"  See the accompanying file LICENSE, version 2009-Jan-02 or later
4
4
.\"  (the contents of which are also included in unzip.h) for terms of use.
5
5
.\"  If, for some reason, all these files are missing, the Info-ZIP license
6
6
.\"  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
20
20
.in -4n
21
21
..
22
22
.\" =========================================================================
23
 
.TH UNZIP 1 "28 February 2005 (v5.52)" "Info-ZIP"
 
23
.TH UNZIP 1 "20 April 2009 (v6.0)" "Info-ZIP"
24
24
.SH NAME
25
25
unzip \- list, test and extract compressed files in a ZIP archive
26
26
.PD
27
27
.SH SYNOPSIS
28
 
\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCKLMVWX$/:\fP]]
 
28
\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCDKLMUVWX$/:^\fP]]
29
29
\fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.]
30
30
[\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] [\fB\-d\fP\ \fIexdir\fP]
31
31
.PD
78
78
.IP [\fB\-x\fP\ \fIxfile(s)\fP]
79
79
An optional list of archive members to be excluded from processing.
80
80
Since wildcard characters normally match (`/') directory separators
81
 
(for exceptions see the option \fb\-W\fp\), this option may be used
 
81
(for exceptions see the option \fB\-W\fP), this option may be used
82
82
to exclude any files that are in subdirectories.  For
83
83
example, ``\fCunzip foo *.[ch] -x */*\fR'' would extract all C source files
84
84
in the main directory, but none in any subdirectories.  Without the \fB\-x\fP
167
167
above for information on setting the timezone properly.
168
168
.TP
169
169
.B \-v
170
 
be verbose or print diagnostic version info.  This option has evolved and
171
 
now behaves as both an option and a modifier.  As an option it has two
172
 
purposes:  when a zipfile is specified with no other options, \fB\-v\fP lists
173
 
archive files verbosely, adding to the basic \fB\-l\fP info the compression
174
 
method, compressed size, compression ratio and 32-bit CRC.  In contrast to
175
 
most of the competing utilities, \fIunzip\fP removes the 12 additional header
176
 
bytes of encrypted entries from the compressed size numbers.  Therefore,
 
170
list archive files (verbose format) or show diagnostic version info.
 
171
This option has evolved and now behaves as both an option and a modifier.
 
172
As an option it has two purposes:  when a zipfile is specified with no
 
173
other options, \fB\-v\fP lists archive files verbosely, adding to the
 
174
basic \fB\-l\fP info the compression method, compressed size,
 
175
compression ratio and 32-bit CRC.  In contrast to most of the competing
 
176
utilities, \fIunzip\fP removes the 12 additional header bytes of
 
177
encrypted entries from the compressed size numbers.  Therefore,
177
178
compressed size and compression ratio figures are independent of the entry's
178
179
encryption status and show the correct compression performance.  (The complete
179
180
size of the encrypted compressed data stream for zipfile entries is reported
214
215
prints ``\fC[text]\fR'' or ``\fC[binary]\fR'' as a visual check for each file
215
216
it extracts when using the \fB\-a\fP option.  The \fB\-aa\fP option forces
216
217
all files to be extracted as text, regardless of the supposed file type.
 
218
On VMS, see also \fB\-S\fP.
217
219
.TP
218
220
.B \-b
219
221
[general] treat all files as binary (no text conversions).  This is a shortcut
233
235
files.
234
236
.TP
235
237
.B \-B
236
 
[Unix only, and only if compiled with UNIXBACKUP defined] save a backup copy
237
 
of each overwritten file with a tilde appended (e.g., the old copy of
238
 
``\fCfoo\fR'' is renamed to ``\fCfoo~\fR'').  This is similar to the default
239
 
behavior of \fIemacs\fP(1) in many locations.
 
238
[when compiled with UNIXBACKUP defined] save a backup copy of each
 
239
overwritten file. The backup file is gets the name of the target file with
 
240
a tilde and optionally a unique sequence number (up to 5 digits) appended.
 
241
The sequence number is applied whenever another file with the original name
 
242
plus tilde already exists.  When used together with the "overwrite all"
 
243
option \fB\-o\fP, numbered backup files are never created. In this case,
 
244
all backup files are named as the original file with an appended tilde,
 
245
existing backup files are deleted without notice.
 
246
This feature works similarly to the default behavior of \fIemacs\fP(1)
 
247
in many locations.
 
248
.IP
 
249
Example: the old copy of ``\fCfoo\fR'' is renamed to ``\fCfoo~\fR''.
 
250
.IP
 
251
Warning: Users should be aware that the \fB-B\fP option does not prevent
 
252
loss of existing data under all circumstances.  For example, when
 
253
\fIunzip\fP is run in overwrite-all mode, an existing ``\fCfoo~\fR'' file
 
254
is deleted before \fIunzip\fP attempts to rename ``\fCfoo\fR'' to
 
255
``\fCfoo~\fR''.  When this rename attempt fails (because of a file locks,
 
256
insufficient privileges, or ...), the extraction of ``\fCfoo~\fR'' gets
 
257
cancelled, but the old backup file is already lost.  A similar scenario
 
258
takes place when the sequence number range for numbered backup files gets
 
259
exhausted (99999, or 65535 for 16-bit systems).  In this case, the backup
 
260
file with the maximum sequence number is deleted and replaced by the new
 
261
backup version without notice.
240
262
.TP
241
263
.B \-C
242
264
use case-insensitive matching for the selection of archive entries
258
280
(or ``\fCmake*\fR'', or similar).  The \fB\-C\fP option affects
259
281
file specs in both the normal file list and the excluded-file list (xlist).
260
282
.IP
261
 
Please note that the \fB\-L\fP option does neither affect the search for
 
283
Please note that the \fB\-C\fP option does neither affect the search for
262
284
the zipfile(s) nor the matching of archive entries to existing files on
263
285
the extraction path.  On a case-sensitive file system, \fIunzip\fP will
264
286
never try to overwrite a file ``FOO'' when extracting an entry ``foo''!
265
287
.TP
 
288
.B \-D
 
289
skip restoration of timestamps for extracted items.  Normally, \fIunzip\fP
 
290
tries to restore all meta-information for extracted items that are supplied
 
291
in the Zip archive (and do not require privileges or impose a security risk).
 
292
By specifying \fB\-D\fP, \fIunzip\fP is told to suppress restoration of
 
293
timestamps for directories explicitly created from Zip archive entries.
 
294
This option only applies to ports that support setting timestamps for
 
295
directories (currently ATheOS, BeOS, MacOS, OS/2, Unix, VMS, Win32, for other
 
296
\fIunzip\fP ports, \fB\-D\fP has no effect).
 
297
The duplicated option \fB\-DD\fP forces suppression of timestamp restoration
 
298
for all extracted entries (files and directories).  This option results in
 
299
setting the timestamps for all extracted entries to the current time.
 
300
.IP
 
301
On VMS, the default setting for this option is \fB\-D\fP for consistency
 
302
with the behaviour of BACKUP: file timestamps are restored, timestamps of
 
303
extracted directories are left at the current time.  To enable restoration
 
304
of directory timestamps, the negated option \fB\--D\fP should be specified.
 
305
On VMS, the option \fB\-D\fP disables timestamp restoration for all extracted
 
306
Zip archive items.  (Here, a single \fB\-D\fP on the command line combines
 
307
with the default \fB\-D\fP to do what an explicit \fB\-DD\fP does on other
 
308
systems.)
 
309
.TP
266
310
.B \-E
267
311
[MacOS only] display contents of MacOS extra field during restore operation.
268
312
.TP
368
412
spaces in filenames.  Conversion of spaces to underscores can eliminate the
369
413
awkwardness in some cases.
370
414
.TP
 
415
.B \-S
 
416
[VMS] convert text files (\fB\-a\fP, \fB\-aa\fP) into Stream_LF record format,
 
417
instead of the text-file default, variable-length record format.
 
418
(Stream_LF is the default record format of VMS \fIunzip\fP. It is applied
 
419
unless conversion (\fB\-a\fP, \fB\-aa\fP and/or \fB\-b\fP, \fB\-bb\fP) is
 
420
requested or a VMS-specific entry is processed.)
 
421
.TP
371
422
.B \-U
372
 
(obsolete; to be removed in a future release) leave filenames uppercase if
 
423
[UNICODE_SUPPORT only] modify or disable UTF-8 handling.
 
424
When UNICODE_SUPPORT is available, the option \fB\-U\fP forces \fIunzip\fP
 
425
to escape all non-ASCII characters from UTF-8 coded filenames as ``#Uxxxx''
 
426
(for UCS-2 characters, or ``#Lxxxxxx'' for unicode codepoints needing 3
 
427
octets).  This option is mainly provided for debugging purpose when the
 
428
fairly new UTF-8 support is suspected to mangle up extracted filenames.
 
429
.IP
 
430
The option \fB\-UU\fP allows to entirely disable the recognition of UTF-8
 
431
encoded filenames.  The handling of filename codings within \fIunzip\fP falls
 
432
back to the behaviour of previous versions.
 
433
.IP
 
434
[old, obsolete usage] leave filenames uppercase if
373
435
created under MS-DOS, VMS, etc.  See \fB\-L\fP above.
374
436
.TP
375
437
.B \-V
405
467
would not work as expected on a wildcard zipfile specification.)
406
468
.TP
407
469
.B \-X
408
 
[VMS, Unix, OS/2, NT] restore owner/protection info (UICs) under VMS, or user
409
 
and group info (UID/GID) under Unix, or access control lists (ACLs) under
410
 
certain network-enabled versions of OS/2 (Warp Server with IBM LAN
411
 
Server/Requester 3.0 to 5.0; Warp Connect with IBM Peer 1.0), or security ACLs
412
 
under Windows NT.  In most cases this will require special system privileges,
413
 
and doubling the option (\fB\-XX\fP) under NT instructs \fIunzip\fP to use
414
 
privileges for extraction; but under Unix, for example, a user who belongs to
415
 
several groups can restore files owned by any of those groups, as long as the
416
 
user IDs match his or her own.  Note that ordinary file attributes are always
417
 
restored--this option applies only to optional, extra ownership info available
418
 
on some operating systems.  [NT's access control lists do not appear to be
419
 
especially compatible with OS/2's, so no attempt is made at cross-platform
420
 
portability of access privileges.  It is not clear under what conditions this
421
 
would ever be useful anyway.]
 
470
[VMS, Unix, OS/2, NT, Tandem] restore owner/protection info (UICs and ACL
 
471
entries) under VMS, or user and group info (UID/GID) under Unix, or access
 
472
control lists (ACLs) under certain network-enabled versions of OS/2
 
473
(Warp Server with IBM LAN Server/Requester 3.0 to 5.0; Warp Connect with
 
474
IBM Peer 1.0), or security ACLs under Windows NT.  In most cases this will
 
475
require special system privileges, and doubling the option (\fB\-XX\fP)
 
476
under NT instructs \fIunzip\fP to use privileges for extraction; but under
 
477
Unix, for example, a user who belongs to several groups can restore files
 
478
owned by any of those groups, as long as the user IDs match his or her own.
 
479
Note that ordinary file attributes are always restored--this option applies
 
480
only to optional, extra ownership info available on some operating systems.
 
481
[NT's access control lists do not appear to be especially compatible with
 
482
OS/2's, so no attempt is made at cross-platform portability of access
 
483
privileges.  It is not clear under what conditions this would ever be
 
484
useful anyway.]
 
485
.TP
 
486
.B \-Y
 
487
[VMS] treat archived file name endings of ``.nnn'' (where ``nnn'' is a
 
488
decimal  number) as if they were VMS version numbers (``;nnn'').
 
489
(The default is to treat them as file types.)  Example:
 
490
.EX
 
491
     "a.b.3" -> "a.b;3".
 
492
.EE
422
493
.TP
423
494
.B \-$
424
495
.\" Amiga support possible eventually, but not yet
449
520
the root directory by specifying enough ``../'' path components within the
450
521
zip archive.
451
522
Use this option with extreme caution.
 
523
.TP
 
524
.B \-^
 
525
[Unix only] allow control characters in names of extracted ZIP archive
 
526
entries.  On Unix, a file name may contain any (8-bit) character code with
 
527
the two exception '/' (directory delimiter) and NUL (0x00, the C string
 
528
termination indicator), unless the specific file system has more
 
529
restrictive conventions.  Generally, this allows to embed ASCII control
 
530
characters (or even sophisticated control sequences) in file names, at least
 
531
on 'native' Unix file systems.  However, it may be highly suspicious to
 
532
make use of this Unix "feature".  Embedded control characters in file names
 
533
might have nasty side effects when displayed on screen by some listing code
 
534
without sufficient filtering.  And, for ordinary users, it may be difficult
 
535
to handle such file names (e.g. when trying to specify it for open, copy,
 
536
move, or delete operations).  Therefore, \fIunzip\fP applies a filter by
 
537
default that removes potentially dangerous control characters from the
 
538
extracted file names. The \fB-^\fP option allows to override this filter
 
539
in the rare case that embedded filename control characters are to be
 
540
intentionally restored.
 
541
.TP
 
542
.B \-2
 
543
[VMS] force unconditionally conversion of file names to ODS2-compatible
 
544
names.  The default is to exploit the destination file system, preserving
 
545
case and extended file name characters on an ODS5 destination file system;
 
546
and applying the ODS2-compatibility file name filtering on an ODS2 destination
 
547
file system.
452
548
.PD
453
549
.\" =========================================================================
454
550
.SH "ENVIRONMENT OPTIONS"
472
568
set UNZIP=\-qq
473
569
.TP
474
570
  VMS (quotes for \fIlowercase\fP):
475
 
define UNZIP_OPTS ""\-qq""
 
571
define UNZIP_OPTS "\-qq"
476
572
.PP
477
573
Environment options are, in effect, considered to be just like any other
478
574
command-line options, except that they are effectively the first options
560
656
Archives encrypted with 8-bit passwords (for example, passwords with accented
561
657
European characters) may not be portable across systems and/or other
562
658
archivers.  This problem stems from the use of multiple encoding methods for
563
 
such characters, including Latin-1 (ISO 8859-1) and OEM code page 850.  DOS
564
 
\fIPKZIP\fP 2.04g uses the OEM code page; Windows \fIPKZIP\fP 2.50 uses
565
 
Latin-1 (and is therefore incompatible with DOS \fIPKZIP\fP); Info-ZIP uses
566
 
the OEM code page on DOS, OS/2 and Win3.x ports but Latin-1 everywhere
567
 
else; and Nico Mak's \fIWinZip\fP 6.x does not allow 8-bit passwords at all.
568
 
\fIUnZip\fP 5.3 (or newer) attempts to use the default character set first
569
 
(e.g., Latin-1), followed by the alternate one (e.g., OEM code page) to test
570
 
passwords.  On EBCDIC systems, if both of these fail, EBCDIC encoding will
571
 
be tested as a last resort.  (EBCDIC is not tested on non-EBCDIC systems,
572
 
because there are no known archivers that encrypt using EBCDIC encoding.)
573
 
ISO character encodings other than Latin-1 are not supported.
 
659
such characters, including Latin-1 (ISO 8859-1) and OEM code page 850.
 
660
DOS \fIPKZIP\fP 2.04g uses the OEM code page; Windows \fIPKZIP\fP 2.50
 
661
uses Latin-1 (and is therefore incompatible with DOS \fIPKZIP\fP); Info-ZIP
 
662
uses the OEM code page on DOS, OS/2 and Win3.x ports but ISO coding
 
663
(Latin-1 etc.) everywhere else; and Nico Mak's \fIWinZip\fP 6.x does not
 
664
allow 8-bit passwords at all.  \fIUnZip\fP 5.3 (or newer) attempts to use
 
665
the default character set first (e.g., Latin-1), followed by the alternate
 
666
one (e.g., OEM code page) to test passwords.  On EBCDIC systems, if both
 
667
of these fail, EBCDIC encoding will be tested as a last resort.  (EBCDIC is
 
668
not tested on non-EBCDIC systems, because there are no known archivers
 
669
that encrypt using EBCDIC encoding.)  ISO character encodings other than
 
670
Latin-1 are not supported.  The new addition of (partially) Unicode (resp.
 
671
UTF-8) support in \fIUnZip\fP 6.0 has not yet been adapted to the encryption
 
672
password handling in \fIunzip\fP.  On systems that use UTF-8 as native
 
673
character encoding, \fIunzip\fP simply tries decryption with the native
 
674
UTF-8 encoded password; the built-in attempts to check the password in
 
675
translated encoding have not yet been adapted for UTF-8 support and
 
676
will consequently fail.
574
677
.PD
575
678
.\" =========================================================================
576
679
.SH EXAMPLES
775
878
.SH BUGS
776
879
Multi-part archives are not yet supported, except in conjunction with
777
880
\fIzip\fP.  (All parts must be concatenated together in order, and then
778
 
``\fCzip \-F\fR'' must be performed on the concatenated archive in order
779
 
to ``fix'' it.)  This will definitely be corrected in the next major release.
 
881
``\fCzip \-F\fR'' (for \fIzip 2.x\fP) or ``\fCzip \-FF\fR'' (for
 
882
\fIzip 3.x\fP) must be performed on the concatenated archive in order to
 
883
``fix'' it.  Also, \fIzip 3.0\fP and later can combine multi-part (split)
 
884
archives into a combined single-file archive using ``\fCzip \-s\- inarchive
 
885
-O outarchive\fR''.  See the \fIzip 3\fP manual page for more information.)
 
886
This will definitely be corrected in the next major release.
780
887
.PP
781
888
Archives read from standard input are not yet supported, except with
782
889
\fIfunzip\fP (and then only the first member of the archive can be extracted).
854
961
.SH AUTHORS
855
962
The primary Info-ZIP authors (current semi-active members of the Zip-Bugs
856
963
workgroup) are:  Ed Gordon (Zip, general maintenance, shared code, Zip64,
857
 
Win32, Unix); Christian Spieler (UnZip maintenance coordination, VMS, MS-DOS,
858
 
Win32, shared code, general Zip and UnZip integration and optimization);
859
 
Onno van der Linden (Zip); Mike White (Win32, Windows GUI, Windows DLLs);
860
 
Kai Uwe Rommel (OS/2, Win32); Steven M. Schweda (VMS, support of new features);
861
 
Paul Kienitz (Amiga, Win32); Chris Herborth (BeOS, QNX, Atari); Jonathan Hudson
862
 
(SMS/QDOS); Sergio Monesi (Acorn RISC OS); Harald Denker (Atari, MVS);
863
 
John Bush (Solaris, Amiga); Hunter Goatley (VMS, Info-ZIP Site maintenance);
864
 
Steve Salisbury (Win32); Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS,
865
 
Win32, Zip64); and Dave Smith (Tandem NSK).
 
964
Win32, Unix, Unicode); Christian Spieler (UnZip maintenance coordination,
 
965
VMS, MS-DOS, Win32, shared code, general Zip and UnZip integration and
 
966
optimization); Onno van der Linden (Zip); Mike White (Win32, Windows GUI,
 
967
Windows DLLs); Kai Uwe Rommel (OS/2, Win32); Steven M. Schweda (VMS, Unix,
 
968
support of new features); Paul Kienitz (Amiga, Win32, Unicode); Chris
 
969
Herborth (BeOS, QNX, Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi
 
970
(Acorn RISC OS); Harald Denker (Atari, MVS); John Bush (Solaris, Amiga);
 
971
Hunter Goatley (VMS, Info-ZIP Site maintenance); Steve Salisbury (Win32);
 
972
Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS, Win32, Zip64); and Dave
 
973
Smith (Tandem NSK).
866
974
.PP
867
975
The following people were former members of the Info-ZIP development group
868
976
and provided major contributions to key parts of the current code:
927
1035
Info-ZIP (Zip-Bugs subgroup, SPC)
928
1036
.IP "v5.52\t28 Feb 05"
929
1037
Info-ZIP (Zip-Bugs subgroup, SPC)
 
1038
.IP "v6.0\t20 Apr 09"
 
1039
Info-ZIP (Zip-Bugs subgroup, SPC)
930
1040
.PD