📄 vms_zip.rnh
字号:
.!.! File: ZIP.RNH.!.! Author: Hunter Goatley.!.! Date: October 22, 1991.!.! Description:.!.! RUNOFF source file for portable ZIP on-line help for VMS..! Adapted from ZIP.DOC, distributed with ZIP..!.! To build: $ RUNOFF ZIP.RNH.! $ LIBR/HELP/INSERT libr ZIP.!.! Modification history:.!.! Hunter Goatley 22-OCT-1991 20:45.! Genesis..! Jean-loup Gailly 25 March 92.! Adaptation to zip 1.6..! Igor Mandrichenko 9-JUN-1992.! Added explanation of -V option..! Jean-loup Gailly 14 June 92.! Adaptation to zip 1.8..! Jean-loup Gailly 20 Aug 92.! Adaptation to zip 1.9..! Jean-loup Gailly 31 Aug 93.! Adaptation to zip 2.0..!.noflags.lm4 .rm72.indent -41 ZIP.brZip is a compression and file packaging utility for Unix, MSDOS, OS/2, andVMS. It is analogous to a combination of tar and compress and iscompatible with PKZIP (Phil Katz ZIP) for MSDOS systems..skThere is a companion to Zip called UnZip (of course). Zip and UnZip canwork with files produced by PKZIP under MSDOS, and PKZIP and PKUNZIP canwork with files produced by Zip..skZip 1.9 is compatible with PKZIP 1.93a.Note that pkunzip 1.10 cannot extract files produced by pkzip 1.93aor zip 1.9. You must use pkzip 1.93a or unzip 5.0 to extract them..skFor a brief help on Zip and Unzip, run each without specifying anyparameters on the command line..skZip puts one or more compressed files into a single "zip file" along withinformation about the files, including the name, path if requested, dateand time last modified, protection, and check information to verify thefidelity of each entry. Zip can pack an entire directory structure in azip file with a single command. Compression ratios of 2:1 to 3:1 arecommon for text files. Zip has has one compression method (deflation) andcan also store files without compression. It automatically chooses the betterof the two for each file to be compressed..skZip is useful for packaging a set of files to send to someone or fordistribution; for archiving or backing up files; and for saving disk spaceby temporarily compressing unused files or directories..skFormat:.sk;.lm+1;.literalZIP [-options] [-b path] [-n suffixes] [-t mmddyy] zipfile file(s) [-xi list].end literal;.lm-1.!------------------------------------------------------------------------------.indent -42 Options.brThe default action of Zip is to add or replace zipfile entries from list, whichcan include the special name -@ to read names from SYS$INPUT. The followinglist of options was taken from the on-line help generated when Zip is runwithout any command-line parameters:.sk.literal -b use "path" for temp files -c add one-line comments -d delete entries in zipfile -f freshen: only changed files -F fix zipfile (-FF try harder) -g allow growing existing zipfile -h show this help -i include only the following names -j junk (don't record) directory names -k simulate PKZIP made zipfile -l translate end-of-lines -L show software license -m move into zipfile (delete files) -n don't compress theses suffixes -o make zipfile as old as latest entry -q quiet operation -r recurse into directories -t only do files after "mmddyy" -T test zip file integrity -u update: only changed or new files -V save VMS file attributes -w append the VMS version number to name stored in zip file -x exclude the names that follow from those operated on -z add zipfile comment -0 store only -1 compress faster -9 compress better.end literal.!------------------------------------------------------------------------------.indent -42 How_To_Use_Zip.brThe simplest use of Zip is as follows:.sk;.indent 10;$ zip stuff *.skThis will create the file "STUFF.ZIP" (assuming it does not exist) and putall the files in the current directory in STUFF.ZIP in a compressed form.The .ZIP suffix is added automatically, unless that file name givencontains a dot already. This allows specifying suffixes other than ".ZIP"..skTo zip up an entire directory, the command:.sk;.indent 10$ zip -r foo *.*.skwill create the file "FOO.ZIP" containing all the files and directories inthe in the current directory. The "r" option means recurse through thedirectory structure. If you wish to recurse through the subdirectory [x.y]use the following syntax:.sk;.indent 10zip -r foo [x]y.dir.skYou may want to make a zip file that contains the files in [.FOO], but notrecord the directory name, FOO. You can use the -j (junk path) option toleave off the path:.sk;.indent 10$ zip -j foo [.foo]*.*.skYou might be zipping to save disk space, in which case you could:.sk;.indent 10$ zip -rm foo *.txt.skwhere the "m" option means "move". This will delete all files matching*.txt after making FOO.ZIP. No deletions will be done until the zip hascompleted with no errors. This option is obviously more dangerous andshould be used with care..skIf the zip file already exists, these commands will replace existing or addnew entries to the zip file. For example, if you were really short on diskspace, you might not have enough room simultaneously to hold the directory[.FOO] and the compressed FOO.ZIP. In this case, you could do it in steps.If [.FOO] contained the subdirectories [.TOM], [.DICK], and [.HARRY], thenyou could:.sk;.indent 10;$ zip -rm foo [.foo.tom].indent 10;$ zip -rm foo [.foo.dick].indent 10;$ zip -rm foo [.foo.harry].skwhere the first command would create FOO.ZIP, and the next two would add toit. At the completion of each zip command, the files in the directory justzipped would be deleted, making room in which the next Zip command couldwork..!------------------------------------------------------------------------------.indent -42 Modifying_Existing_Zip_Files.brWhen given the name of an existing zip file with the above commands, Zipwill replace identically named entries in the Zip file or add entries fornew names. For example, if FOO.ZIP exists and contains foo/file1 andfoo/file2, and the directory [.FOO] contains the files foo/file1 andfoo/file3, then:.sk;.indent 10$ zip -r foo foo.skwill replace foo/file1 in foo.zip and add foo/file3 to FOO.ZIP. Afterthis, FOO.ZIP contains foo/file1, foo/file2, and foo/file3, with foo/file2unchanged from before..skWhen changing an existing zip file, Zip will write a temporary file withthe new contents, and only replace the old one when the zip has completedwith no errors. You can usethe -b option to specify a different path (usually a different dev- ice) toput the temporary files in. For example:.sk;.indent 10$ zip -b scratch$:[tmp] stuff *.skwill put the temporary zip file and the temporary compression files in thedirectory "SCRATCH$:[TMP]", copying over STUFF.ZIP in the current directorywhen done..skIf you are only adding entries to a zip file, not replacing, and the -goption is given, then Zip grows (appends to) the file instead of copyingit. The danger of this is that if the operation fails, the original zipfile is corrupted and lost..skThere are two other ways to change or add entries in a zip file that arerestrictions of simple addition or replacement. The first is -u (update)which will add new entries to the zip file as before but will replaceexisting entries only if the modified date of the file is more recent thanthe date recorded for that name in the zip file. For example:.sk;.indent 10$ zip -u stuff *.skwill add any new files in the current directory, and update any changedfiles in the zip file STUFF.ZIP. Note that Zip will not try to packSTUFF.ZIP into itself when you do this. Zip will always exclude the zipfile from the files on which to be operated..skThe second restriction is -f (freshen) which, like update, will onlyreplace entries with newer files; unlike update, will not add files thatare not already in the zip file. For this option, you may want to simplyfreshen all of the files that are in the specified zip file. To do thisyou would simply:.sk;.indent 10$ zip -f foo.skNote that the -f option with no arguments freshens all the entries in the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -