1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636
|
.!
.! 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>
===
|