⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zip.1

📁 汇编大全 中国矿业大学计算机学院 汇编实验5
💻 1
📖 第 1 页 / 共 2 页
字号:
.I .sndwithout trying to compress them(image and sound files often have their own specialized compression methods).By default,.I zipdoes not compress files with extensions in the list.I .Z:.zip:.zoo:.arc:.lzh:.arj.Such files are stored directly in the output archive.The environment variable ZIPOPT can be used to change the default options. Forexample under Unix with csh:.RS.IPsetenv ZIPOPT "-n .gif:.zip".RE.IPTo attempt compression on all files, use:.RS.IPzip -n : foo .RE.IPThe maximum compression option.B \-9also attempts compression on all files regardless of extension..TP.B \-oSet the "last modified" time of the.I ziparchive to the latest (oldest) "last modified" timefound among the entries in the.I ziparchive.This can be used without any other operations, if desired.For example:.IP\fCzip -o foo\fP.IPwill change the last modified time of.I foo.zipto the latest time of the entries in.IR foo.zip ..TP.B \-qQuiet mode;eliminate informational messages and comment prompts.(Useful, for example, in shell scripts and background tasks)..TP.B \-rTravel the directory structure recursively;for example:.RS.IP\fCzip -r foo foo\fP.RE.IPIn this case, all the files and directories in.I fooare saved in a.I ziparchive named.IR foo.zip ,including files with names starting with ".",since the recursion does not use the shell's file-name substitution mechanism.If you wish to include only a specific subset of the files in directory.I fooand its subdirectories, use the.B \-ioption to the specify the pattern of files to be included.You should not use.B \-rwith the name ".*",since that matches ".."which will attempt to zip up the parent directory(probably not what was intended)..TP.B \-SInclude system and hidden files. This option iseffective on some systems only; it is ignored on Unix..TP.BI \-t\ mmddyyDo not operate on files modified prior to the specified date,where.I mmis the month (0-12),.I ddis the day of the month (1-31),and.I yyare the last two digits of the year.For example:.RS.IP\fCzip -rt 120791 infamy foo\fP.RE.IPwill add all the files in.I fooand its subdirectories that were last modified on or after 7 December 1991,to the.I ziparchive.IR infamy.zip ..TP.B \-TTest the integrity of the new zip file. If the check fails, the old zip fileis unchanged and (with the.B -moption) not input files are removed..TP.B \-uReplace (update) an existing entry in the.I ziparchive only if it has been modified more recentlythan the version already in the.I ziparchive.For example:.RS.IP\fCzip -u stuff *\fP.RE.IPwill add any new files in the current directory,and update any files which have been modified since the.I ziparchive.I stuff.zipwas last created/modified (note that.I zipwill not try to pack.I stuff.zipinto itself when you do this). .IPNote that the.B \-uoption with no arguments acts like the.B \-f(freshen) option..TP.B \-vVerbose mode. Display a progress indicator during compression..TP.B \-VSave VMS file attributes. This option is available on VMS only;.I ziparchives created with this option will generally not be usableon other systems..TP.B \-wAppend the version number of the files to the name,including multiple versions of files.(VMS only; default:use only the most recent version of a specified file)..TP.BI \-x\ filesExplicitly exclude the specified files, as in:.RS.IP\fCzip -r foo foo -x \\*.o\fP.RE.IPwhich will include the contents of.I fooin.I foo.zipwhile excluding all the files that end in.IR \& .o .The backslash avoids the shell filename substitution, so that thename matching is performed by.I zipat all directory levels..TP.B \-yStore symbolic links as such in the.I ziparchive,instead of compressing and storing the file referred to by the link(UNIX only)..TP.B \-zPrompt for a multi-line comment for the entire.I ziparchive.The comment is ended by a line containing just a period,or an end of file condition (^D on UNIX, ^Z on MSDOS, OS/2, and VAX/VMS).The comment can be taken from a file:.RS.IP\fCzip -z foo < foowhat\fP.RE.TP.BI \-#Regulate the speed of compression using the specified digit.IR # ,where.B \-0indicates no compression (store all files),.B \-1indicates the fastest compression method (less compression)and.B \-9indicates the slowest compression method (optimal compression, ignoresthe suffix list). The default compression level is.BR \-6..TP.B \-@Take the list of input files from standard input..TP.B \-$Include the volume label for the the drive holding the first file to becompressed.  If you want to include only the volume label or to force aspecific drive, use the drive name as first file name, as in:.RS.IP\fCzip -$ foo a: c:bar\fP.RE.IPThis option is effective on some systems only (MSDOS and OS/2); it isignored on Unix..SH "EXAMPLES"The simplest example:.IP\fCzip stuff *\fP.LPcreates the archive.I stuff.zip(assuming it does not exist)and puts all the files in the current directory in it, in compressed form(the.I \&.zipsuffix is added automatically,unless that archive name given contains a dot already;this allows the explicit specification of other suffixes)..LPBecause of the way the shell does filename substitution,files starting with "." are not included;to include these as well:.IP\fCzip stuff .* *\fP.LPEven this will not include any subdirectories from the current directory..LPTo zip up an entire directory, the command:.IP\fCzip -r foo foo\fP.LPcreates the archive.IR foo.zip ,containing all the files and directories in the directory.I foothat is contained within the current directory..LPYou may want to make a.I ziparchive that contains the files in.IR foo ,without recording the directory name,.IR foo .You can use the.B \-joption to leave off the paths,as in:.IP\fCzip -j foo foo/*\fP.LPIf you are short on disk space,you might not have enough room to hold both the original directoryand the corresponding compressed.I ziparchive.In this case, you can create the archive in steps using the.B \-moption.If.I foocontains the subdirectories.IR tom ,.IR dick ,and.IR harry ,you can:.IP\fCzip -rm foo foo/tom\fP.br\fCzip -rm foo foo/dick\fP.br\fCzip -rm foo foo/harry\fP.LPwhere the first command creates.IR foo.zip ,and the next two add to it.At the completion of each.I zipcommand,the last created archive is deleted,making room for the next.I zipcommand to function..SH "PATTERN MATCHING"This section applies only to UNIX.Watch this space for details on MSDOS and VMS operation..LPThe UNIX shells.RI ( sh (1)and.IR csh (1))do filename substitution on command arguments.The special characters are:.TP.B ?match any single character.TP.B *match any number of characters (including none).TP.B []match any character in the range indicated within the brackets(example: [a\-f], [0\-9])..LPWhen these characters are encountered(without being escaped with a backslash or quotes),the shell will look for files relative to the current paththat match the pattern,and replace the argument with a list of the names that matched..LPThe.I zipprogram can do the same matching on names that are in the.I ziparchive being modified or,in the case of the.B \-x(exclude) or.B \-i(include) options, on the list of files to be operated on, by usingbackslashes or quotes to tell the shell not to do the name expansion.In general, when.I zipencounters a name in the list of files to do, it first looks for the name inthe file system.  If it finds it, it then adds it to the list of files to do.If it does not find it, it looks for the name in the.I ziparchive being modified (if it exists), using the pattern matching charactersdescribed above, if present.  For each match, it will add that name to thelist of files to be processed, unless this name matches one givenwith the.B \-xoption, or does not match any name given with the.B \-ioption..LPThe pattern matching includes the path,and so patterns like \\*.o match names that end in ".o",no matter what the path prefix is.Note that the backslash must precede every special character (i.e. ?*[]),or the entire argument must be enclosed in double quotes ("")..LPIn general, use backslash to make.I zipdo the pattern matching with the.B \-f(freshen) and.B \-d(delete) options,and sometimes after the.B \-x(exclude) option when used with an appropriate operation (add,.BR \-u ,.BR \-f ,or.BR \-d )..SH "SEE ALSO"compress(1),shar(1L),tar(1),unzip(1L),gzip(1L).SH BUGS.I zip2.0 is not compatible with PKUNZIP 1.10. Use.I zip1.1 to produce.I zipfiles which can be extracted by PKUNZIP 1.10..PP.I zipfiles produced by.I zip2.0 must not be.I updatedby.I zip1.1 or PKZIP 1.10, if they containencrypted members, or if they have been produced in a pipe or on a nonseekable device. The old versions of.I zipor PKZIP would create an archive with an incorrect format.The old versions can list the contents of the zip filebut cannot extract it anyway (because of the new compression algorithm).If you do not use encryption and use regular disk files, you donot have to care about this problem..LPUnder VMS,not all of the odd file formats are treated properly.Only stream-LF format.I zipfiles are expected to work with.IR zip .Others can be converted using Rahul Dhesi's BILF program.This version of.I ziphandles some of the conversion internally.When using Kermit to transfer zip files from Vax to MSDOS, type "setfile type block" on the Vax.  When transfering from MSDOS to Vax, type"set file type fixed" on the Vax.  In both cases, type "set file typebinary" on MSDOS..LPUnder VMS, zip hangs for file specification that uses DECnet syntax.I foo::*.*..LPOn OS/2, zip cannot match some names, such as those including anexclamation mark or a hash sign.  This is a bug in OS/2 itself: the32-bit DosFindFirst/Next don't find such names.  Other programs suchas GNU tar are also affected by this bug..LPUnder OS/2, the amount of External Attributes displayed by DIR is (forcompatibility) the amount returned by the 16-bit version ofDosQueryPathInfo(). Otherwise OS/2 1.3 and 2.0 would report differentEA sizes when DIRing a file.However, the structure layout returned by the 32-bit DosQueryPathInfo()is a bit different, it uses extra padding bytes and link pointers (it'sa linked list) to have all fields on 4-byte boundaries for portabilityto future RISC OS/2 versions. Therefore the value reported by.I zip(which uses this 32-bit-mode size) differs from that reported by DIR..I zipstores the 32-bit format for portability, even the 16-bitMS-C-compiled version running on OS/2 1.3, so even this one shows the32-bit-mode size..SH AUTHORSCopyright (C) 1990-1993 Mark Adler, Richard B. Wales, Jean-loup Gailly,Kai Uwe Rommel, Igor Mandrichenko and John Bush.Permission is granted to any individual or institution to use, copy, orredistribute this software so long as all of the original files are included,that it is not sold for profit, and that this copyright noticeis retained..LPLIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES AREPROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED ORIMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGESRESULTING FROM THE USE OF THIS SOFTWARE..LPPlease send bug reports and comments by email to:.IR zip\-bugs@wkuvx1.bitnet.For bug reports, please include the version of.IR zip ,the make options used to compile it,the machine and operating system in use,and as much additional information as possible..SH ACKNOWLEDGEMENTSThanks to R. P. Byrne for his.I Shrink.Pasprogram, which inspired this project,and from which the shrink algorithm was stolen;to Phil Katz for placing in the public domain the.I zipfile format, compression format, and .ZIP filename extension, and foraccepting minor changes to the file format; to Steve Burg forclarifications on the deflate format; to Haruhiko Okumura and LeonidBroukhis for providing some useful ideas for the compressionalgorithm; to Keith Petersen, Rich Wales, Hunter Goatley and MarkAdler for providing a mailing list and.I ftpsite for the INFO-ZIP group to use; and most importantly, to theINFO-ZIP group itself (listed in the file.IR infozip.who )without whose tireless testing and bug-fixing efforts a portable.I zipwould not have been possible.Finally we should thank (blame) the first INFO-ZIP moderator,David Kirschbaum,for getting us into this mess in the first place.The manual page was rewritten for UNIX by R. P. C. Rodgers..\" end of file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -