home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip21.zip / vms / vms_zip.rnh < prev    next >
Text File  |  1996-04-14  |  21KB  |  483 lines

  1. .!
  2. .!  File:       ZIP.RNH
  3. .!
  4. .!  Author:     Hunter Goatley
  5. .!
  6. .!  Date:       October 22, 1991
  7. .!
  8. .!  Description:
  9. .!
  10. .!      RUNOFF source file for portable ZIP on-line help for VMS.
  11. .!      Adapted from ZIP.DOC, distributed with ZIP.
  12. .!
  13. .!      To build:       $ RUNOFF ZIP.RNH
  14. .!                      $ LIBR/HELP/INSERT libr ZIP
  15. .!
  16. .!  Modification history:
  17. .!
  18. .!      Hunter Goatley          22-OCT-1991 20:45
  19. .!              Genesis.
  20. .!      Jean-loup Gailly        25 March 92
  21. .!              Adaptation to zip 1.6.
  22. .!      Igor Mandrichenko       9-JUN-1992
  23. .!              Added explanation of -V option.
  24. .!      Jean-loup Gailly        14 June 92
  25. .!              Adaptation to zip 1.8.
  26. .!      Jean-loup Gailly        20 Aug 92
  27. .!              Adaptation to zip 1.9.
  28. .!      Jean-loup Gailly        31 Aug 93
  29. .!              Adaptation to zip 2.0.
  30. .!      Christian Spieler       20 Sep 93
  31. .!              Adaptation to zip 2.0 and OpenVMS completed.
  32. .!      Christian Spieler       05 Dec 95
  33. .!              Adaptation to zip 2.1, new options.
  34. .!      Christian Spieler       20 Jan 96
  35. .!              Changed -L and -v descriptions.
  36. .!      Christian Spieler       11 Feb 96
  37. .!              Added -X option.
  38. .!      Onno van der Linden,
  39. .!      Christian Spieler       13 Mar 96
  40. .!              Removed -ee option.
  41. .!
  42. .noflags
  43. .lm4 .rm72
  44. .indent -4
  45. 1 ZIP
  46. .br
  47. Zip is a compression and file packaging utility for Unix, MSDOS, OS/2, and
  48. VMS.  It is analogous to a combination of tar and compress and is
  49. compatible with PKZIP (Phil Katz ZIP) for MSDOS systems.
  50. .sk
  51. There is a companion to Zip called UnZip (of course).  Zip and UnZip can
  52. work with files produced by PKZIP under MSDOS, and PKZIP and PKUNZIP can
  53. work with files produced by Zip.
  54. .sk
  55. Zip 2.1 is compatible with PKZIP 2.04.
  56. Note that PKUNZIP 1.10 cannot extract files produced by PKZIP 2.04
  57. or zip 2.1. You must use PKZIP 2.04g or unzip 5.0p1 (or later versions)
  58. to extract them.
  59. .sk
  60. For a brief help on Zip and Unzip, run each without specifying any
  61. parameters on the command line.
  62. .sk
  63. The program is useful for packaging a set of files for  distribution;
  64. for archiving files; and for saving disk space by temporarily compressing
  65. unused files or directories.
  66. .sk
  67. Zip puts one or more compressed files into a single "zip file", along with
  68. information about the files (name, path, date and time of last modification,
  69. protection, and check information to verify file integrity).  Zip can pack
  70. an entire directory structure in a zip file with a single command.
  71. Compression ratios of 2:1 to 3:1 are common for text files.  Zip has has
  72. one compression method (deflation) and can also store files without
  73. compression.  It automatically chooses the better of the two for each file
  74. to be compressed.
  75. .sk
  76. Format:
  77. .sk;.lm+1;.literal
  78. ZIP [-options] [-b path] [-n suffixes] [-t mmddyy] zipfile file(s)
  79.     [-x list] [-i list]
  80. .end literal;.lm-1
  81. .!------------------------------------------------------------------------------
  82. .indent -4
  83. 2 Options
  84. .br
  85. The default action of Zip is to add or replace zipfile entries from list, which
  86. can include the special name -@ to read names from SYS$INPUT.  The following
  87. list of options was taken from the on-line help generated when Zip is run
  88. without any command-line parameters:
  89. .sk
  90. .literal
  91.   -A   adjust self-extracting exe
  92.   -b   use "path" for temp files
  93.   -c   add one-line comments
  94.   -d   delete entries in zipfile
  95.   -D   do not add directory entries
  96.   -e   encrypt
  97.   -f   freshen: only changed files
  98.   -F   fix zipfile (-FF try harder)
  99.   -g   allow growing existing zipfile
  100.   -h   show this help
  101.   -i   include only the following names
  102.   -j   junk (don't record) directory names
  103.   -J   junk (remove) prepended (SFX) stub
  104.   -k   simulate PKZIP made zipfile
  105.   -l   translate end-of-lines (LF -> CRLF)
  106.   -ll  translate end-of-lines (CRLF -> LF)
  107.   -L   show software license
  108.   -m   move into zipfile (delete files)
  109.   -n   don't compress theses suffixes
  110.   -o   make zipfile as old as latest entry
  111.   -q   quiet operation
  112.   -r   recurse into directories
  113.   -t   only do files after "mmddyy"
  114.   -T   test zip file integrity
  115.   -u   update: only changed or new files
  116.   -v   verbose messages/print version info
  117.   -V   save VMS file attributes
  118.   -w   append the VMS version number to name stored in zip file
  119.   -x   exclude the names that follow from those operated on
  120.   -X   suppress storing of any extra file attributes
  121.   -z   add zipfile comment
  122.   -0   store only
  123.   -1   compress faster
  124.   -9   compress better
  125.   -@   read list of input files from SYS$INPUT
  126. .end literal
  127. .!------------------------------------------------------------------------------
  128. .indent -4
  129. 2 How_To_Use_Zip
  130. .br
  131. The simplest use of Zip is as follows:
  132. .sk;.indent 10;$ zip stuff *
  133. .sk
  134. This will create the file "STUFF.ZIP" (assuming it does not exist) and put
  135. all the files in the current directory in STUFF.ZIP in a compressed form.
  136. The .ZIP suffix is added automatically, unless that file name given
  137. contains a dot already.  This allows specifying suffixes other than ".ZIP".
  138. .sk
  139. To zip up an entire directory, the command:
  140. .sk;.indent 10
  141. $ zip -r foo *.*
  142. .sk
  143. will create the file "FOO.ZIP" containing all the files and directories in
  144. the in the current directory.  The "r" option means recurse through the
  145. directory structure. If you wish to recurse through the subdirectory [x.y]
  146. use the following syntax:
  147. .sk;.indent 10
  148. zip -r foo [x]y.dir
  149. .sk
  150. You may want to make a zip file that contains the files in [.FOO], but not
  151. record the directory name, FOO.  You can use the -j (junk path) option to
  152. leave off the path:
  153. .sk;.indent 10
  154. $ zip -j foo [.foo]*.*
  155. .sk
  156. You might be zipping to save disk space, in which case you could:
  157. .sk;.indent 10
  158. $ zip -rm foo *.txt
  159. .sk
  160. where the "m" option means "move".  This will delete all files matching
  161. *.txt after making FOO.ZIP.  No deletions will be done until the zip has
  162. completed with no errors.  This option is obviously more dangerous and
  163. should be used with care.
  164. .sk
  165. If the zip file already exists, these commands will replace existing or add
  166. new entries to the zip file.  For example, if you were really short on disk
  167. space, you might not have enough room simultaneously to hold the directory
  168. [.FOO] and the compressed FOO.ZIP.  In this case, you could do it in steps.
  169. If [.FOO] contained the subdirectories [.TOM], [.DICK], and [.HARRY], then
  170. you could:
  171. .sk;
  172. .indent 10;$ zip -rm foo [.foo.tom]
  173. .indent 10;$ zip -rm foo [.foo.dick]
  174. .indent 10;$ zip -rm foo [.foo.harry]
  175. .sk
  176. where the first command would create FOO.ZIP, and the next two would add to
  177. it.  At the completion of each zip command, the files in the directory just
  178. zipped would be deleted, making room in which the next Zip command could
  179. work.
  180. .!------------------------------------------------------------------------------
  181. .indent -4
  182. 2 Modifying_Existing_Zip_Files
  183. .br
  184. When given the name of an existing zip file with the above commands, Zip
  185. will replace identically named entries in the Zip file or add entries for
  186. new names.  For example, if FOO.ZIP exists and contains foo/file1 and
  187. foo/file2, and the directory [.FOO] contains the files foo/file1 and
  188. foo/file3, then:
  189. .sk;.indent 10
  190. $ zip -r foo foo
  191. .sk
  192. will replace foo/file1 in foo.zip and add foo/file3 to FOO.ZIP.  After
  193. this, FOO.ZIP contains foo/file1, foo/file2, and foo/file3, with foo/file2
  194. unchanged from before.
  195. .sk
  196. When changing an existing zip file, Zip will write a temporary file with
  197. the new contents, and only replace the old one when the zip has completed
  198. with no errors. You can use
  199. the -b option to specify a different path (usually a different dev- ice) to
  200. put the temporary files in.  For example:
  201. .sk;.indent 10
  202. $ zip -b scratch$:[tmp] stuff *
  203. .sk
  204. will put the temporary zip file and the temporary compression files in the
  205. directory "SCRATCH$:[TMP]", copying over STUFF.ZIP in the current directory
  206. when done.
  207. .sk
  208. If you are only adding entries to a zip file, not replacing, and the -g
  209. option is given, then Zip grows (appends to) the file instead of copying
  210. it.  The danger of this is that if the operation fails, the original zip
  211. file is corrupted and lost.
  212. .sk
  213. There are two other ways to change or add entries in a zip file that are
  214. restrictions of simple addition or replacement.  The first is -u (update)
  215. which will add new entries to the zip file as before but will replace
  216. existing entries only if the modified date of the file is more recent than
  217. the date recorded for that name in the zip file.  For example:
  218. .sk;.indent 10
  219. $ zip -u stuff *
  220. .sk
  221. will add any new files in the current directory, and update any changed
  222. files in the zip file STUFF.ZIP.  Note that Zip will not try to pack
  223. STUFF.ZIP into itself when you do this. Zip will always exclude the zip
  224. file from the files on which to be operated.
  225. .sk
  226. The second restriction is -f (freshen) which, like update, will only
  227. replace entries with newer files; unlike update, will not add files that
  228. are not already in the zip file. For this option, you may want to simply
  229. freshen all of the files that are in the specified zip file.  To do this
  230. you would simply:
  231. .sk;.indent 10
  232. $ zip -f foo
  233. .sk
  234. Note that the -f option with no arguments freshens all the entries in the
  235. zip file.  The same is true of -u, and hence "zip -u foo" and "zip -f foo"
  236. both do the same thing.
  237. .sk
  238. This command should be run from the same directory from which the original
  239. zip command was run, since paths stored in zip files are always relative.
  240. .sk
  241. Another restriction that can be used with adding, updating, or freshening
  242. is -t (time), which will not operate on files modified earlier than the
  243. specified date.  For example:
  244. .sk;.indent 10
  245. $ zip -rt 120791 infamy [.FOO]*.*
  246. .sk
  247. will add all the files in [.FOO] and its subdirectories that were last
  248. modified on December 7, 1991, or later to the zip file INFAMY.ZIP.
  249. .sk
  250. Also, files can be explicitly excluded using the -x option:
  251. .sk;.indent 10
  252. $ zip -r foo [.FOO] -x *.obj
  253. .sk
  254. which will zip up the contents of [.FOO] into FOO.ZIP but exclude all the
  255. files that end in ".OBJ".
  256. .sk
  257. The last operation is -d (delete) which will remove entries from a zip
  258. file.  An example might be:
  259. .sk;.indent 10
  260. $ zip -d foo foo/harry/*.* *.obj
  261. .sk
  262. which will remove all of the files that start with "foo/harry/" and all of
  263. the files that end with ".OBJ" (in any path).
  264. .sk
  265. Under MSDOS, -d is case sensitive when it matches names in the zip file.
  266. This allows deleting names that were zipped on other systems, but requires
  267. that the names be entered in upper case if they were zipped on an MSDOS
  268. system, so that the names can be found in the zip file and deleted.
  269. .!------------------------------------------------------------------------------
  270. .indent -4
  271. 2 More_Options
  272. .br
  273. As mentioned before, Zip will use the best of two methods: deflate or store.
  274. The option -0 will force Zip to use store on all files. For example:
  275. .sk;.indent 10
  276. zip -r0 foo foo
  277. .sk
  278. will zip up the directory foo into foo.zip using only store.
  279. .sk
  280. The speed of deflation can also be controlled with options -1 (fastest
  281. method but less compression) to -9 (best compression but slower). The
  282. default value is -6. For example:
  283. .sk;.indent 10
  284. zip -r8 foo foo
  285. .sk
  286. In nearly all cases, a file that is already compressed cannot be compressed
  287. further by Zip, or if it can, the effect is minimal.  The -n option
  288. prevents Zip from trying to compress files that have the
  289. given suffixes.  Such files are simply stored (0%
  290. compression) in the
  291. output zip file, so that Zip doesn't waste its time trying to compress
  292. them. The suffixes are separated by
  293. either colons or semicolons.  For example, in DCL:
  294. .sk
  295. .indent 10;$ zip -rn ".Z:.zip:.tiff:.gif:.snd" foo [.FOO]*.*
  296. .sk
  297. will put everything in [.FOO] into FOO.ZIP, but will store any files that end
  298. in .Z, .ZIP, .TIFF, .GIF, or .SND without trying to compress them.  (Image and
  299. sound files often have their own specialized compression methods.)
  300. The default suffix list is ".Z:.zip;.zoo:.arc:.lzh:.arj".
  301. The environment variable ZIPOPT can be used to change this default. For
  302. example:
  303. .sk
  304. .indent 10;$ ZIPOPT == "-n .Z:.zip:.tiff:.gif:.snd"
  305. .sk
  306. The variable ZIPOPT can be used for any option and can include several
  307. options.
  308. .sk
  309. Under Unix, Zip will store the full path (relative to the current path)
  310. and name of the file (or just the name if -j is specified) in the zip
  311. file along with the Unix attributes, and it will mark the entry as made
  312. under Unix.  If the zip file is intended for PKUNZIP under MSDOS, then
  313. the -k (Katz) option should be used to attempt to convert the names and
  314. paths to conform to MSDOS, store only the MSDOS attribute (just the
  315. user write attribute from Unix), and mark the entry as made under MSDOS
  316. (even though it wasn't).
  317. .sk
  318. The -o (older) option will set the "last modified" time of the zip file to
  319. the latest "last modified" time of the entries in the zip file.  This can
  320. be used without any other operations, if desired.  For example:
  321. .sk;.indent 10
  322. $ zip -o foo
  323. .sk
  324. will change the last modified time of FOO.ZIP to the latest time of the
  325. entries in FOO.ZIP.
  326. .sk
  327. The -e and -c options operate on all files updated or added to the zip
  328. file.  Encryption (-e) will prompt for a password on the terminal and will
  329. not echo the password as it is typed (if SYS$COMMAND is not a TTY, Zip will
  330. exit with an error). New zip entries will be encrypted using that password.
  331. For added peace of mind, Zip will prompt for the password a second time,
  332. checking that the two inputs are the same before using it.
  333. .sk
  334. One-line comments can be added for each file with the -c option.  The zip
  335. file operations (adding or updating) will be done first, and you will then
  336. be prompted for a one-line comment for each file.  You can then enter the
  337. comment followed by return, or just return for no comment.
  338. .sk
  339. The -z option will prompt you for a multi-line comment for the entire zip
  340. file.  This option can be used by itself, or in combination with other
  341. options.  The comment is ended by a line containing just a period, or an
  342. end of file condition (^D on Unix, ^Z on MSDOS, OS/2, and OpenVMS).
  343. .sk
  344. The -q (quiet) option eliminates the informational messages and comment
  345. prompts while Zip is operating.  This might be used in shell scripts, for
  346. example, or if the zip operation is being performed as a background task
  347. ("$ spawn/nowait zip -q foo *.c").
  348. .sk
  349. Zip can take a list of file names to operate on from SYS$INPUT using the
  350. "-@"
  351. option.
  352. .!  In Unix, this option can be used with the find command to extend
  353. .!greatly the functionality of Zip. For example, to zip up all the C source
  354. .!files in the current directory and its subdirectories, you can:
  355. .!.sk
  356. .!find . -type f -name "*.[ch]" -print | zip source -@
  357. .!.sk
  358. .!Note that the pattern must be quoted to keep the shell from expanding it.
  359. .sk
  360. The -X option (remember to quote it!) suppresses saving of additional
  361. "extra file attributes" in the zipfile. Its effect is to disable the
  362. VMS only -V option (see below), and prevent storing of UNIX compatible
  363. GMT modification time stamps. These UNIX compatible GMT time stamps
  364. -- which are quite useful when transporting Zip archives world wide (but
  365. are only recognized by Info-ZIP's UnZip 5.20 or later) --
  366. are included in the zipfile unless -X of -V is specified.
  367. .sk
  368. Under VMS only, the -w option will append the version number of the files
  369. to the name and zip up multiple versions of files.  Without -w, Zip will
  370. only use the most recent version of the specified file(s).
  371. .sk
  372. One more option that valid only under VMS is -V option. This option saves
  373. all (hopefully) file attributes needed to make EXACT copy of the
  374. file after extraction from archive. To extract a file with saved attributes
  375. use UnZip version 5.0p1 or later. Note that to specify this option you should
  376. quote it ("-V"). Be carefull: it's rather hard (if possible at all) to extract
  377. a file archived on VMS with this option specified on other systems. See
  378. documentation on UnZip for further information.
  379. .sk
  380. The -l option translates the Unix end-of-line character LF into the
  381. MSDOS convention CR LF. This option should not be used on binary files.
  382. This option can be used on Unix if the zip file is intended for PKUNZIP
  383. under MSDOS.
  384. .sk
  385. If Zip is run with the -h option, or with no arguments and standard output is
  386. a terminal, the license and the command-argument and option help is shown.
  387. .sk
  388. The -L option shows the Zip license.
  389. .sk
  390. The -v option, when given as the only command line argument, directs Zip to
  391. display diagnostic information that shows when and how the executable was
  392. built and set up. This includes info on used compiler and compiler version
  393. (if available) as well as any optional compile time feature flags.
  394. Additionally, the content of the environment variables
  395. (logical names) read by Zip for runtime configuration are shown. This
  396. information is especially valuable when reporting problems or bugs.
  397. .!------------------------------------------------------------------------------
  398. .indent -4
  399. 2 Copyright
  400. .br
  401.      Copyright (C) 1990,1996 Mark Adler, Richard B. Wales, Jean-loup Gailly,
  402.      Igor Mandrichenko and Kai Uwe Rommel. Permission is granted to any
  403.      individual or institution to use, copy, or redistribute this software
  404.      so long as all of the original files are included, that it is not sold
  405.      for profit, and that this copyright notice is retained.
  406. .sk
  407.      LIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES
  408.      ARE PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY
  409.      KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE
  410.      COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES RESULTING FROM
  411.      THE USE OF THIS SOFTWARE.
  412. .sk
  413.      Please send bug reports or comments by email to:
  414.      Zip-Bugs@wkuvx1.wku.edu.  For bug reports, please include
  415.      the version of Zip (see zip -h), the make options you used to
  416.      compile it (see zip -v), the machine and operating system you are using,
  417.      and as much additional information as possible.
  418.      Thank you for your support.
  419. .!------------------------------------------------------------------------------
  420. .indent -4
  421. 2 Acknowledgements
  422. .br
  423.      Thanks to R. P. Byrne  for  his  Shrink.Pas  program,  which
  424.      inspired  this  project, and from which the shrink algorithm
  425.      was stolen; to Phil Katz for placing in  the  public  domain
  426.      the  zip  file format, compression format, and .ZIP filename
  427.      extension, and for accepting minor changes to the file  for-
  428.      mat; to Steve Burg for clarifications on the deflate format;
  429.      to Keith Petersen, Rich Wales, Hunter Goatley and Mark Adler
  430.      for  providing  a mailing list and ftp site for the INFO-ZIP
  431.      group to use; and most importantly, to  the  INFO-ZIP  group
  432.      itself  (listed in the file infozip.who) without whose tire-
  433.      less testing and bug-fixing efforts a portable zip would not
  434.      have  been  possible.   Finally  we should thank (blame) the
  435.      first INFO-ZIP moderator, David Kirschbaum, for  getting  us
  436.      into  this  mess  in  the  first place.
  437. .!------------------------------------------------------------------------------
  438. .indent -4
  439. 2 Bugs
  440. .sk
  441.      Zip 2.1 is not compatible with PKUNZIP 1.10. Use Zip 1.1 instead
  442.      to produce zip archives which can be extracted by PKUNZIP 1.10.
  443. .sk
  444.      WARNING: zip files produced by this version of zip must not be
  445.      *updated* by zip 1.0 or PKZIP 1.10 or PKZIP 1.93a, if they contain
  446.      encrypted members, or if they have been produced in a pipe or on a non
  447.      seekable device. The old versions of zip or pkzip would destroy the
  448.      zip structure. The old versions can list the contents of the zip file
  449.      but cannot extract it anyway (because of the new compression algorithm).
  450.      If you do not use encryption and use regular disk files, you do
  451.      not have to care about this problem.
  452. .sk
  453.      Under VMS, not all of the odd file formats are treated properly.
  454.      Only zip files of format stream-LF and fixed length 512 are expected
  455.      to work with Zip.  Others can be converted using Rahul Dhesi's BILF
  456.      program.  This version of Zip does handle some of the
  457.      conversion internally.  The use of the "-V" option to save the
  458.      VMS attributes should work without problem for at least all types
  459.      of sequential files.  There have been rumors that indexed files
  460.      are not always restored properly.
  461. .sk
  462.      When using Kermit to transfer zip files from VMS to MSDOS, type "set
  463.      file type block" on the VMS side.  When transfering from MSDOS to VMS,
  464.      type "set file type fixed" on the VMS machine.  In both cases, type
  465.      "set file type binary" on MSDOS.
  466. .sk
  467.      Under VMS, zip hangs for file specification that uses DECnet
  468.      syntax (foo::*.*).
  469. .sk
  470.      LIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES
  471.      ARE PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY
  472.      KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE
  473.      COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES RESULTING FROM
  474.      THE USE OF THIS SOFTWARE.
  475. .sk
  476.      That having been said, please send any problems or comments
  477.      via email to the Internet address Zip-Bugs@wkuvx1.wku.edu.  For
  478.      bug reports, please include the version of Zip, the make
  479.      options you used to compile it, the machine and operating
  480.      system you are using, and as much additional information as
  481.      possible.  Thank you for your support.
  482. .!------------------------------------------------------------------------------
  483.