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