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

📄 zip.1

📁 汇编大全 中国矿业大学计算机学院 汇编实验5
💻 1
📖 第 1 页 / 共 2 页
字号:
.\" Copyright (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, or.\" redistribute this software so long as all of the original files are.\" included, that it is not sold for profit, and that this copyright notice.\" is retained..\" zip.1 by Mark Adler, Jean-loup Gailly and  R. P. C. Rodgers.\".TH ZIP 1L "2 Sept 1993".SH NAMEzip, zipcloak, zipnote, zipsplit \- package and compress (archive) files.SH SYNOPSIS.B zip.RB [ \-cdDeEfFghjklLmoqrSTuvVwyz@$ ].RB [ \-b\ path ].RB [ \-n\ suffixes ].RB [ \-t\ mmddyy ].I [ zipfile.I [ file1.IR file2 " .\|.\|." ]].RB [ \-xi\ list ].PP.B zipcloak.RB [ \-dhL ].RB [ \-b\ path ].I zipfile.PP.B zipnote.RB [ \-hwL ].RB [ \-b\ path ].I zipfile.PP.B zipsplit.RB [ \-hitL ].RB [ \-b\ path ].I zipfile.SH DESCRIPTION.I zipis a compression and file packaging utility for Unix, VMS, MSDOS,OS/2, Windows NT, Minix, Atari and Macintosh.It is analogous to a combination of the UNIX commands.IR tar (1)and.IR compress (1)and is compatible with PKZIP (Phil Katz's ZIP for MSDOS systems)..LPA companion program.RI ( unzip (1L)),unpacks.I ziparchives.The.I zipand.IR unzip (1L)programs can work with archives produced by PKZIP,and PKZIP and PKUNZIP can work with archives produced by.IR zip ..I zipversion 2.0 is compatible with PKZIP 2.04Note that PKUNZIP 1.10 cannot extract files produced by PKZIP 2.04or.I zip2.0. You must use PKUNZIP 2.04g or.I unzip5.0p1 (or later versions) to extract them..PPFor a brief help on.I zipand.I unzip,run each without specifying any parameters on the command line..PPThe program is useful for packaging a set of files for distribution;for archiving files;and for saving disk space by temporarilycompressing unused files or directories..LPThe.I zipprogram puts one or more compressed files into a single.I ziparchive,along with information about the files(name, path, date, time of last modification, protection,and check information to verify file integrity).An entire directory structure can be packed into a.I ziparchive with a single command.Compression ratios of 2:1 to 3:1 are common for text files..I ziphas one compression method (deflation) and can also store files withoutcompression..I zipautomatically chooses the better of the two for each file to be compressed..LPWhen given the name of an existing.I ziparchive,.I zipwill replace identically named entries in the.I ziparchive or add entries for new names.For example,if.I foo.zipexists and contains.I foo/file1and.IR foo/file2 ,and the directory.I foocontains the files.I foo/file1and.IR foo/file3 ,then:.IP\fCzip -r foo foo\fP.LPwill replace.I foo/file1in.I foo.zipand add.I foo/file3to.IR foo.zip .After this,.I foo.zipcontains.IR foo/file1 ,.IR foo/file2 ,and.IR foo/file3 ,with.I foo/file2unchanged from before..LPIf the file list is specified as.BR \-@ ,.I ziptakes the list of input files from standard input.Under UNIX,this option can be used to powerful effect in conjunction with the.IR find (1)command.For example,to archive all the C source files in the current directory andits subdirectories:.IP\fCfind . -name "*.[ch]" -print | zip source -@\fP.LP(note that the pattern must be quoted to keep the shell from expanding it)..I zipwill also accept a single dash ("-") as the zip file name, in which case itwill write the zip file to standard output, allowing the output to be pipedto another program. For example:.IP\fCzip -r - . | dd of=/dev/nrst0 obs=16k\fP.LPwould write the zip output directly to a tape with the specified block sizefor the purpose of backing up the current directory..LP.I zipalso accepts a single dash ("-") as the name of a file to be compressed, inwhich case it will read the file from standard input, allowing zip to takeinput from another program. For example:.IP\fCtar cf - . | zip backup -\fP.LPwould compress the output of the tar command for the purpose of backing upthe current directory. This generally produces better compression thanthe previous example using the -r option, because.I zipcan take advantage of redundancy between files. The backup can be restoredusing the command.IP\fCunzip -p backup | tar xf -\fP.LPWhen no zip file name is given and stdout is not a terminal,.I zipacts as a filter, compressing standard input to standard output.For example,.IP\fCtar cf - . | zip | dd of=/dev/nrst0 obs=16k\fP.LPis equivalent to.IP\fCtar cf - . | zip - - | dd of=/dev/nrst0 obs=16k\fP.LP.I ziparchives created in this manner can be extracted with the program.I funzipwhich is provided in the.I unzippackage, or by.I gunzipwhich is provided in the.I gzippackage. For example:.LP\fPdd if=/dev/nrst0  ibs=16k | funzip | tar xvf -\fC.LPWhen changing an existing.I ziparchive,.I zipwill write a temporary file with the new contents,and only replace the old one when the process of creating the new versionhas been completed without error..LPIf the name of the.I ziparchive does not contain an extension, the extension.IR .zipis added. If the name already contains an extension other than.IR .zipthe existing extension is kept unchanged..SH "OPTIONS".TP.BI \-b\ pathUse the specified.I pathfor the temporary.I ziparchive. For example:.RS.IP\fCzip -b /tmp stuff *\fP.RE.IPwill put the temporary.I ziparchive in the directory.IR /tmp ,copying over.I stuff.zipto the current directory when done. This option is only useful whenupdating an existing archive, and the file system containing thisold archive does not have enough space to hold both old and new archiveat the same time..TP.B \-cAdd one-line comments for each file.File operations (adding, updating) are done first,and the user is then prompted for a one-line comment for each file.Enter the comment followed by return, or just return for no comment..TP.B \-dRemove (delete) entries from a.I ziparchive.For example:.RS.IP\fCzip -d foo foo/tom/junk foo/harry/\\* \\*.o\fP.RE.IPwill remove the entry.IR foo/tom/junk ,all of the files that start with.IR foo/harry/ ,and all of the files that end with.I \&.o(in any path).Note that shell pathname expansion has been inhibited with backslashes,so that.I zipcan see the asterisks,  enabling.I zipto match on the contents of the.I ziparchive instead of the contents of the current directory..IPUnder MSDOS,.B \-dis case sensitive when it matches names in the.I ziparchive.This requires that file names be entered in upper case if they werezipped by PKZIP on an MSDOS system..TP.B \-DDo not create entries in the.I ziparchive for directories.  Directory entries are created by default so thattheir attributes can be saved in the zip archive.The environment variable ZIPOPT can be used to change the default options. Forexample under Unix with sh:.RS.IPZIPOPT="-D"; export ZIPOPT.RE.IP(The variable ZIPOPT can be used for any option except.B \-iand.B \-xand can include several options.) The option.B \-Dis a shorthandfor.B \-x"*/" but the latter cannot be set as default in the ZIPOPT environmentvariable..TP.B \-eEncrypt the contents of the.I ziparchive using a password which is entered on the terminal in responseto a prompt(this will not be echoed; if standard error is not a tty,.I zipwill exit with an error)..TP.B \-eeEncrypt contents, prompting for the password.IR twice ,checking that the two entries are identical before using the password..TP.B \-fReplace (freshen) an existing entry in the.I ziparchive only if it has been modified more recently than theversion already in the.I ziparchive;unlike the update option.RB ( \-u )this will not add files that are not already in the.I ziparchive.For example:.RS.IP\fCzip -f foo\fP.RE.IPThis command should be run from the same directory from which the original.I zipcommand was run,since paths stored in.I ziparchives are always relative..TP.B \-FFix the.I ziparchive. This option can be used if some portions of the archiveare missing. It is not guaranteed to work, so you MUST make a backupof the original archive first..IPWhen doubled as in.B \-FFthe compressed sizes given inside the damaged archive are not trustedand zip scans for special signatures to identify the limits betweenthe archive members. The single.B \-Fis more reliable if the archive is not too much damaged, for exampleif it has only been truncated, so try this option first..IPNeither option will recover archives that have been incorrectlytransferred in ascii mode instead of binary. After the repair, the.B \-toption of.I unzipmay show that some files have a bad CRC. Such files cannot be recovered;you can remove them from the archive using the.B \-doption of.I zip..TP.B \-gGrow (append to) the specified.I ziparchive, instead of creating a new one. If this operation fails,.I zipattempts to restore the archive to its original state. If the restorationfails, the archive might become corrupted..TP.B \-hDisplay the.I ziphelp information (this also appears if.I zipis run with no arguments)..TP.BI \-i\ filesInclude only the specified files, as in:.RS.IP\fCzip -r foo . -i \\*.c\fP.RE.IPwhich will include only the files that end in.IR \& .cin the current directory and its subdirectories. (Note for PKZIPusers: the equivalent command is.RS.IP\fCpkzip -r foo *.c\fP.RE.IPPKZIP does not allow recursion in directories other than the current one.)The backslash avoids the shell filename substitution, so that thename matching is performed by.I zipat all directory levels..TP.B \-jStore just the name of a saved file (junk the path), and do not storedirectory names. By default,.I zipwill store the full path (relative to the current path)..TP.B \-kAttempt to convert the names and paths to conform to MSDOS,store only the MSDOS attribute (just the user write attribute from UNIX),and mark the entry as made under MSDOS (even though it was not);for compatibility with PKUNZIP under MSDOS which cannot handle certainnames such as those with two dots..TP.B \-lTranslate the Unix end-of-line character LF into theMSDOS convention CR LF. This option should not be used on binary files.This option can be used on Unix if the zip file is intended for PKUNZIPunder MSDOS. If the input files already contain CR LF, this option addsan extra CR. This ensure that.I unzip -aon Unix will get back an exact copy of the original file,to undo the effect of.I zip -l..TP.B \-llTranslate the MSDOS end-of-line CR LF into Unix LF.This option should not be used on binary files.This option can be used on MSDOS if the zip file is intended for unzipunder Unix..TP.B \-LDisplay the.I ziplicense..TP.B \-mMove the specified files into the.I ziparchive; actually,this deletes the target directories/files after making the specified.I ziparchive. If a directory becomes empty after removal of the files, thedirectory is also removed. No deletions are done until.I ziphas created the archive without error.This is useful for conserving disk space,but is potentially dangerous so it is recommended to use it incombination with.B \-Tto test the archive before removing all input files..TP.BI \-n\ suffixesDo not attempt to compress files named with the given.I suffixes.Such files are simply stored (0% compression) in the output zip file,so that.I zipdoesn't waste its time trying to compress them.The suffixes are separated byeither colons or semicolons.  For example:.RS.IP\fCzip -rn .Z:.zip:.tiff:.gif:.snd  foo foo\fP.RE.IPwill copy everything from.I foointo.IR foo.zip ,but will store any files that end in.IR .Z ,.IR .zip ,.IR .tiff ,.IR .gif ,or

⌨️ 快捷键说明

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