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

« back to all changes in this revision

Viewing changes to man/zip.1

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2005-03-23 20:12:12 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050323201212-jzsk2g6kn8v49mwp
Tags: 2.31-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\" =========================================================================
2
 
.\" Copyright (c) 1990-1999 Info-ZIP.  All rights reserved.
 
2
.\" Copyright (c) 1990-2005 Info-ZIP.  All rights reserved.
3
3
.\"
4
 
.\" See the accompanying file LICENSE, version 1999-Oct-05 or later
 
4
.\" See the accompanying file LICENSE, version 2005-Feb-10 or later
5
5
.\" (the contents of which are also included in zip.h) for terms of use.
6
 
.\" If, for some reason, both of these files are missing, the Info-ZIP license
7
 
.\" also may be found at:  ftp://ftp.cdrom.com/pub/infozip/license.html
 
6
.\" If, for some reason, all these files are missing, the Info-ZIP license
 
7
.\" also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
8
8
.\" ==========================================================================
9
9
.\"
10
10
.\" zip.1 by Mark Adler, Jean-loup Gailly and  R. P. C. Rodgers
11
11
.\"
12
 
.TH ZIP 1L "14 August 1999 (v2.3)" Info-ZIP
 
12
.TH ZIP 1L "27 February 2005 (v2.31)" Info-ZIP
13
13
.SH NAME
14
14
zip, zipcloak, zipnote, zipsplit \- package and compress (archive) files
15
15
.SH SYNOPSIS
63
63
and PKZIP and PKUNZIP can work with archives produced by
64
64
.IR zip .
65
65
.I zip
66
 
version 2.3 is compatible with PKZIP 2.04.
 
66
version 2.31 is compatible with PKZIP 2.04.
67
67
Note that PKUNZIP 1.10 cannot extract files produced by PKZIP 2.04
68
68
or
69
69
.I zip
70
 
2.3. You must use PKUNZIP 2.04g or
 
70
2.31. You must use PKUNZIP 2.04g or
71
71
.I unzip
72
72
5.0p1 (or later versions) to extract them.
73
73
.PP
178
178
.LP
179
179
would compress the output of the tar command for the purpose of backing up
180
180
the current directory. This generally produces better compression than
181
 
the previous example using the -r option, because
 
181
the previous example using the
 
182
.B \-r
 
183
option, because
182
184
.I zip
183
185
can take advantage of redundancy between files. The backup can be restored
184
186
using the command
206
208
which is provided in the
207
209
.I gzip
208
210
package. For example:
209
 
.LP
210
 
\fPdd if=/dev/nrst0  ibs=16k | funzip | tar xvf -\fC
 
211
.IP
 
212
\fCdd if=/dev/nrst0  ibs=16k | funzip | tar xvf -\fP
211
213
.LP
212
214
When changing an existing
213
215
.I zip
241
243
.LP
242
244
Note: self-extracting archives for the Amiga are a special case.
243
245
At present, only the Amiga port of Zip is capable of adjusting
244
 
or updating these without corrupting them. -J can be used to remove
245
 
the SFX stub if other updates need to be made.
 
246
or updating these without corrupting them.
 
247
.B \-J
 
248
can be used to remove the SFX stub if other updates need to be made.
246
249
.TP
247
250
.BI \-B
248
251
[VM/CMS and MVS] force file to be read binary (default is text).
320
323
.I zip
321
324
archive instead of the contents of the current directory.
322
325
.IP
 
326
Under systems where the shell does not expand wildcards, such as MSDOS,
 
327
the backslashes are not needed.  The above would then be
 
328
.RS
 
329
.IP
 
330
\fCzip -d foo foo/tom/junk foo/harry/* *.o\fP
 
331
.RE
 
332
.IP
323
333
Under MSDOS,
324
334
.B \-d
325
335
is case sensitive when it matches names in the
397
407
.IP
398
408
Note that the timezone environment variable TZ should be set according to
399
409
the local timezone in order for the
400
 
.B -f
 
410
.B \-f
401
411
,
402
 
.B -u
 
412
.B \-u
403
413
and
404
 
.B -o
 
414
.B \-o
405
415
options to work correctly.
406
416
.IP
407
417
The reasons behind this are somewhat subtle but have to do with the differences
474
484
The backslash avoids the shell filename substitution, so that the
475
485
name matching is performed by
476
486
.I zip
477
 
at all directory levels.
 
487
at all directory levels.  Not escaping wildcards on shells that do
 
488
wildcard substitution before zip gets the command line may seem to
 
489
work but files in subdirectories matching the pattern will never be
 
490
checked and so not matched.  For shells, such as Win32 command
 
491
prompts, that do not replace file patterns containing wildcards
 
492
with the respective file names,
 
493
.I zip
 
494
will do the recursion and escaping the wildcards is not needed.
478
495
.IP
479
496
Also possible:
480
497
.RS
486
503
subdirectories that match the patterns in the file include.lst.
487
504
.TP
488
505
.B \-I
489
 
[Acorn RISC OS] Don't scan through Image files.  When used, zip will not
 
506
[Acorn RISC OS] Don't scan through Image files.  When used,
 
507
.I zip
 
508
will not
490
509
consider Image files (eg. DOS partitions or Spark archives when SparkFS
491
510
is loaded) as directories but will store them as single files.
492
 
 
 
511
.IP
493
512
For example, if you have SparkFS loaded, zipping a Spark archive will result
494
513
in a zipfile containing a directory (and its content) while using the 'I'
495
514
option will result in a zipfile containing a Spark archive. Obviously this
521
540
MSDOS convention CR LF. This option should not be used on binary files.
522
541
This option can be used on Unix if the zip file is intended for PKUNZIP
523
542
under MSDOS. If the input files already contain CR LF, this option adds
524
 
an extra CR. This ensure that
525
 
.I unzip -a
 
543
an extra CR. This ensures that
 
544
.I unzip \-a
526
545
on Unix will get back an exact copy of the original file,
527
546
to undo the effect of
528
 
.I zip -l.
 
547
.I zip \-l.
 
548
See the note on binary detection for
 
549
.B \-ll
 
550
below.
529
551
.TP
530
552
.B \-ll
531
553
Translate the MSDOS end-of-line CR LF into Unix LF.
532
 
This option should not be used on binary files.
 
554
This option should not be used on binary files and a warning will be
 
555
issued when a file is converted that later is detected to be binary.
533
556
This option can be used on MSDOS if the zip file is intended for unzip
534
557
under Unix.
 
558
.IP
 
559
In Zip 2.31 binary detection has been changed from a simple percentage
 
560
of binary characters being considered binary to a more selective method
 
561
that should consider files in many character sets, including \fIUTF-8\fP,
 
562
that only include text characters in that character set to be text.
 
563
This allows
 
564
.I unzip -a
 
565
to convert these files.
535
566
.TP
536
567
.B \-L
537
568
Display the
590
621
example under Unix with csh:
591
622
.RS
592
623
.IP
593
 
setenv ZIPOPT "-n .gif:.zip"
 
624
\fCsetenv ZIPOPT "-n .gif:.zip"\fP
594
625
.RE
595
626
.IP
596
627
To attempt compression on all files, use:
597
628
.RS
598
629
.IP
599
 
zip -n : foo
 
630
\fCzip -n : foo\fP
600
631
.RE
601
632
.IP
602
633
The maximum compression option
609
640
.TP
610
641
.B \-N
611
642
[Amiga, MacOS] Save Amiga or MacOS filenotes as zipfile comments. They can be
612
 
restored by using the -N option of unzip. If -c is used also, you are prompted
613
 
for comments only for those files that do not have filenotes.
 
643
restored by using the
 
644
.B \-N
 
645
option of unzip. If
 
646
.B \-c
 
647
is used also, you are prompted for comments only for those files that do not
 
648
have filenotes.
614
649
.TP
615
650
.B \-o
616
651
Set the "last modified" time of the
621
656
archive.
622
657
This can be used without any other operations, if desired.
623
658
For example:
 
659
.RS
624
660
.IP
625
661
\fCzip -o foo\fP
 
662
.RE
626
663
.IP
627
664
will change the last modified time of
628
665
.I foo.zip
629
666
to the latest time of the entries in
630
667
.IR foo.zip .
631
668
.TP
632
 
.IP \fB\-P\fP\ \fIpassword\fP
 
669
\fB\-P\fP\ \fIpassword\fP
633
670
use \fIpassword\fP to encrypt zipfile entries (if any).  \fBTHIS IS
634
671
INSECURE!\fP  Many multi-user operating systems provide ways for any user to
635
672
see the current command line of any other user; even on stand-alone systems
730
767
.RS
731
768
.IP
732
769
\fCzip -rt 12071991 infamy foo\fP
733
 
 
 
770
.IP
734
771
\fCzip -rt 1991-12-07 infamy foo\fP
735
772
.RE
736
773
.IP
761
798
.RS
762
799
.IP
763
800
\fCzip -rtt 11301995 infamy foo\fP
764
 
 
 
801
.IP
765
802
\fCzip -rtt 1995-11-30 infamy foo\fP
766
803
.RE
767
804
.IP
776
813
.B \-T
777
814
Test the integrity of the new zip file. If the check fails, the old zip file
778
815
is unchanged and (with the
779
 
.B -m
 
816
.B \-m
780
817
option) no input files are removed.
781
818
.TP
782
819
.B \-u
818
855
.IP
819
856
When
820
857
.B \-v
821
 
is the only command line argument, and stdout is not redirected to a file,
 
858
is the only command line argument, and either stdin or stdout is
 
859
not redirected to a file,
822
860
a diagnostic screen is printed. In addition to the help screen header
823
861
with program name, version, and release date, some pointers to the Info-ZIP
824
862
home and distribution sites are given. Then, it shows information about the
828
866
executable.
829
867
.TP
830
868
.B \-V
 
869
[VMS] Save VMS file attributes and use portable form.
 
870
.I zip
 
871
archives created with this option are truncated at EOF but still may not be
 
872
usable on other systems depending on the file types being zipped.
 
873
.TP
 
874
.B \-VV
831
875
[VMS] Save VMS file attributes.
832
876
.I zip
833
 
archives created with this option will generally not be usable
834
 
on other systems.
 
877
archives created with this option include the entire file and should be able
 
878
to recreate most VMS files on VMS systems but these archives will generally
 
879
not be usable on other systems.
835
880
.TP
836
881
.B \-w
837
882
[VMS] Append the version number of the files to the name,
849
894
.I foo
850
895
in
851
896
.I foo.zip
852
 
while excluding all the files that end in
853
 
.IR \& .o .
 
897
while excluding all the files that end in \fI.o\fP.
854
898
The backslash avoids the shell filename substitution, so that the
855
899
name matching is performed by
856
900
.I zip
857
 
at all directory levels.
 
901
at all directory levels.  If you do not escape wildcards in patterns
 
902
it may seem to work but files in subdirectories will not be checked
 
903
for matches.
858
904
.IP
859
905
Also possible:
860
906
.RS
866
912
.I foo
867
913
in
868
914
.I foo.zip
869
 
while excluding all the files that match the patterns in the file exclude.lst.
 
915
while excluding all the files that match the patterns in the file exclude.lst
 
916
(each file pattern on a separate line).
870
917
.TP
871
918
.B \-X
872
919
Do not save extra file attributes (Extended Attributes on OS/2, uid/gid
912
959
Take the list of input files from standard input. Only one filename per line.
913
960
.TP
914
961
.B \-$
915
 
[MSDOS, OS/2, WIN32] Include the volume label for the the drive holding
 
962
[MSDOS, OS/2, WIN32] Include the volume label for the drive holding
916
963
the first file to be compressed.  If you want to include only the volume
917
964
label or to force a specific drive, use the drive name as first file name,
918
965
as in:
1001
1048
.I zip
1002
1049
command to function.
1003
1050
.SH "PATTERN MATCHING"
1004
 
This section applies only to UNIX.
 
1051
This section applies only to UNIX, though the ?, *, and [] special
 
1052
characters are implemented on other systems including MSDOS and Win32.
1005
1053
Watch this space for details on MSDOS and VMS operation.
1006
1054
.LP
1007
1055
The UNIX shells
1118
1166
a severe error in the zipfile format was detected.  Processing probably
1119
1167
failed immediately.
1120
1168
.IP 6
1121
 
entry too large to be split with \fIzipsplit\fP
 
1169
entry too large to split (with \fIzipsplit\fP), read, or write
1122
1170
.IP 7
1123
1171
invalid comment format
1124
1172
.IP 8
1125
 
\fIzip\fP -T failed or out of memory
 
1173
.I zip \-T
 
1174
failed or out of memory
1126
1175
.IP 9
1127
1176
the user aborted \fIzip\fP prematurely with control-C (or similar)
1128
1177
.IP 10
1153
1202
.PD
1154
1203
.SH BUGS
1155
1204
.I zip
1156
 
2.3 is not compatible with PKUNZIP 1.10. Use
 
1205
2.31 is not compatible with PKUNZIP 1.10. Use
1157
1206
.I zip
1158
1207
1.1 to produce
1159
1208
.I zip
1162
1211
.I zip
1163
1212
files produced by
1164
1213
.I zip
1165
 
2.3 must not be
 
1214
2.31 must not be
1166
1215
.I updated
1167
1216
by
1168
1217
.I zip
1213
1262
stores the 32-bit format for portability, even the 16-bit
1214
1263
MS-C-compiled version running on OS/2 1.3, so even this one shows the
1215
1264
32-bit-mode size.
 
1265
.LP
 
1266
Development of Zip 3.0 is underway.  See that source distribution for
 
1267
many new features and the latest bug fixes.
1216
1268
.SH AUTHORS
 
1269
Copyright (C) 1997-2005 Info-ZIP.
 
1270
.LP
1217
1271
Copyright (C) 1990-1997 Mark Adler, Richard B. Wales, Jean-loup Gailly,
1218
1272
Onno van der Linden, Kai Uwe Rommel, Igor Mandrichenko, John Bush and
1219
1273
Paul Kienitz.
1227
1281
IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES
1228
1282
RESULTING FROM THE USE OF THIS SOFTWARE.
1229
1283
.LP
1230
 
Please send bug reports and comments by email to:
1231
 
.IR zip\-bugs@lists.wku.edu.
 
1284
Please send bug reports and comments to:
 
1285
.IR zip-bugs
 
1286
at
 
1287
.IR www.info-zip.org .
1232
1288
For bug reports, please include the version of
1233
1289
.IR zip
1234
 
(see
1235
 
.IR zip \-h
1236
 
),
1237
 
the make options used to compile it see
1238
 
.IR zip \-v
1239
 
),
 
1290
(see \fIzip\ \-h\fP),
 
1291
the make options used to compile it (see \fIzip\ \-v\fP),
1240
1292
the machine and operating system in use,
1241
1293
and as much additional information as possible.
1242
1294
.SH ACKNOWLEDGEMENTS