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

📄 unzip.1

📁 完整的解压zip文件的源码。包含密码功能
💻 1
📖 第 1 页 / 共 3 页
字号:
.\" Info-ZIP grants permission to any individual or institution to use, copy,.\" or redistribute this software, so long as:  (1) all of the original files.\" are included; (2) it is not sold for profit; and (3) this notice is re-.\" tained.  See the UnZip COPYING file for details..\".\" unzip.1 by Greg Roelofs, Fulvio Marino, Jim van Zandt and others..\".\" =========================================================================.\" define .Y macro (for user-command examples; normal Courier font):.de Y.ft CW.in +4n.nf\&\\$1.ft.in.fi...\" =========================================================================.TH UNZIP 1L "28 November 1998 (v5.4)" "Info-ZIP".SH NAMEunzip \- list, test and extract compressed files in a ZIP archive.PD.SH SYNOPSIS\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptuvz\fP[\fBabjnoqsCLMVX$\fP]]\fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.][\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] [\fB\-d\fP\ \fIexdir\fP].PD.\" =========================================================================.SH DESCRIPTION\fIunzip\fP will list, test, or extract files from a ZIP archive, commonlyfound on MS-DOS systems.  The default behavior (with no options) is to extractinto the current directory (and subdirectories below it) all files from thespecified ZIP archive.  A companion program, \fIzip\fP(1L), creates ZIParchives; both programs are compatible with archives created by PKWARE's\fIPKZIP\fP and \fIPKUNZIP\fP for MS-DOS, but in many cases the programoptions or default behaviors differ..PD.\" =========================================================================.SH ARGUMENTS.TP.IR file [ .zip ]Path of the ZIP archive(s).  If the file specification is a wildcard,each matching file is processed in an order determined by the operatingsystem (or file system).  Only the filename can be a wildcard; the pathitself cannot.  Wildcard expressions are similar to Unix \fIegrep\fP(1)(regular) expressions and may contain:.RS.IP *matches a sequence of 0 or more characters.IP ?matches exactly 1 character.IP [.\|.\|.]matches any single character found inside the brackets; ranges are specifiedby a beginning character, a hyphen, and an ending character.  If an exclamationpoint or a caret (`!' or `^') follows the left bracket, then the range ofcharacters within the brackets is complemented (that is, anything \fIexcept\fPthe characters inside the brackets is considered a match)..RE.IP(Be sure to quote any character that might otherwise be interpreted ormodified by the operating system, particularly under Unix and VMS.)  If nomatches are found, the specification is assumed to be a literal filename;and if that also fails, the suffix \fC.zip\fR is appended.  Note thatself-extracting ZIP files are supported, as with any other ZIP archive;just specify the \fC.exe\fR suffix (if any) explicitly..IP [\fIfile(s)\fP]An optional list of archive members to be processed, separated by spaces.(VMS versions compiled with VMSCLI defined must delimit files with commasinstead.  See \fB\-v\fP in \fBOPTIONS\fP below.)Regular expressions (wildcards) may be used to match multiple members; seeabove.  Again, be sure to quote expressions that would otherwise be expandedor modified by the operating system..IP [\fB\-x\fP\ \fIxfile(s)\fP]An optional list of archive members to be excluded from processing.Since wildcard characters match directory separators (`/'), this optionmay be used to exclude any files that are in subdirectories.  Forexample, ``\fCunzip foo *.[ch] -x */*\fR'' would extract all C source filesin the main directory, but none in any subdirectories.  Without the \fB\-x\fPoption, all C source files in all directories within the zipfile would beextracted..IP [\fB\-d\fP\ \fIexdir\fP]An optional directory to which to extract files.  By default, all filesand subdirectories are recreated in the current directory; the \fB\-d\fPoption allows extraction in an arbitrary directory (always assuming onehas permission to write to the directory).  This option need not appearat the end of the command line; it is also accepted before the zipfilespecification (with the normal options), immediately after the zipfilespecification, or between the \fIfile(s)\fP and the \fB\-x\fP option.The option and directory may be concatenated without any white spacebetween them, but note that this may cause normal shell behavior to besuppressed.  In particular, ``\fC\-d\ ~\fR'' (tilde) is expanded by UnixC shells into the name of the user's home directory, but ``\fC\-d~\fR''is treated as a literal subdirectory ``\fB~\fP'' of the current directory..\" =========================================================================.SH OPTIONSNote that, in order to support obsolescent hardware, \fIunzip\fP's usagescreen is limited to 22 or 23 lines and should therefore be consideredonly a reminder of the basic \fIunzip\fP syntax rather than an exhaustivelist of all possible flags.  The exhaustive list follows:.TP.B \-Z\fIzipinfo\fP(1L) mode.  If the first option on the command line is \fB\-Z\fP,the remaining options are taken to be \fIzipinfo\fP(1L) options.  See theappropriate manual page for a description of these options..TP.B \-A[OS/2, Unix DLL] print extended help for the DLL's programming interface (API)..TP.B \-cextract files to stdout/screen (``CRT'').  This option is similar to the\fB\-p\fP option except that the name of each file is printed as it isextracted, the \fB\-a\fP option is allowed, and ASCII-EBCDIC conversionis automatically performed if appropriate.  This option is not listed inthe \fIunzip\fP usage screen..TP.B \-ffreshen existing files, i.e., extract only those files thatalready exist on disk and that are newer than the disk copies.  Bydefault \fIunzip\fP queries before overwriting, but the \fB\-o\fP optionmay be used to suppress the queries.  Note that under many operating systems,the TZ (timezone) environment variable must be set correctly in order for\fB\-f\fP and \fB\-u\fP to work properly (under Unix the variable is usuallyset automatically).  The reasons for this are somewhat subtle buthave to do with the differences between DOS-format file times (always localtime) and Unix-format times (always in GMT/UTC) and the necessity to comparethe two.  A typical TZ value is ``PST8PDT'' (US Pacific time with automaticadjustment for Daylight Savings Time or ``summer time'')..TP.B \-llist archive files (short format).  The names, uncompressed file sizes andmodification dates and times of the specified files are printed, alongwith totals for all files specified.  If UnZip was compiled with OS2_EASdefined, the \fB\-l\fP option also lists columns for the sizes of storedOS/2 extended attributes (EAs) and OS/2 access control lists (ACLs).  Inaddition, the zipfile comment and individual file comments (if any) aredisplayed.  If a file was archived from a single-case file system (forexample, the old MS-DOS FAT file system) and the \fB\-L\fP option was given,the filename is converted to lowercase and is prefixed with a caret (^)..TP.B \-pextract files to pipe (stdout).  Nothing but the file data is sent tostdout, and the files are always extracted in binary format, just as theyare stored (no conversions)..TP.B \-ttest archive files.  This option extracts each specified file in memoryand compares the CRC (cyclic redundancy check, an enhanced checksum) ofthe expanded file with the original file's stored CRC value..TP.B \-T[most OSes] set the timestamp on the archive(s) to that of the newest filein each one.  This corresponds to \fIzip\fP's \fB\-go\fP option except thatit can be used on wildcard zipfiles (e.g., ``\fCunzip \-T \e*.zip\fR'') andis much faster..TP.B \-uupdate existing files and create new ones if needed.  This option performsthe same function as the \fB\-f\fP option, extracting (with query) filesthat are newer than those with the same name on disk, and in addition itextracts those files that do not already exist on disk.  See \fB\-f\fPabove for information on setting the timezone properly..TP.B \-vbe verbose or print diagnostic version info.  This option has evolved andnow behaves as both an option and a modifier.  As an option it has twopurposes:  when a zipfile is specified with no other options, \fB\-v\fP listsarchive files verbosely, adding to the basic \fB\-l\fP info the compressionmethod, compressed size, compression ratio and 32-bit CRC.  When no zipfileis specified (that is, the complete command is simply ``\fCunzip \-v\fR''), adiagnostic screen is printed.  In addition to the normal header with releasedate and version, \fIunzip\fP lists the home Info-ZIP ftp site and where tofind a list of other ftp and non-ftp sites; the target operating system forwhich it was compiled, as well as (possibly) the hardware on which it wascompiled, the compiler and version used, and the compilation date; any specialcompilation options that might affect the program's operation (see also\fBDECRYPTION\fP below); and any options stored in environment variablesthat might do the same (see \fBENVIRONMENT OPTIONS\fP below).  As amodifier it works in conjunction with other options (e.g., \fB\-t\fP) toproduce more verbose or debugging output; this is not yet fully implementedbut will be in future releases..TP.B \-zdisplay only the archive comment..PD.\" =========================================================================.SH MODIFIERS.TP.B \-aconvert text files.  Ordinarily all files are extracted exactly as theyare stored (as ``binary'' files).  The \fB\-a\fP option causes files identifiedby \fIzip\fP as text files (those with the `t' label in \fIzipinfo\fPlistings, rather than `b') to be automatically extracted as such, convertingline endings, end-of-file characters and the character set itself as necessary.(For example, Unix files use line feeds (LFs) for end-of-line (EOL) andhave no end-of-file (EOF) marker; Macintoshes use carriage returns (CRs)for EOLs; and most PC operating systems use CR+LF for EOLs and control-Z forEOF.  In addition, IBM mainframes and the Michigan Terminal System use EBCDICrather than the more common ASCII character set, and NT supports Unicode.)Note that \fIzip\fP's identification of text files is by no means perfect; some``text'' files may actually be binary and vice versa.  \fIunzip\fP thereforeprints ``\fC[text]\fR'' or ``\fC[binary]\fR'' as a visual check for each fileit extracts when using the \fB\-a\fP option.  The \fB\-aa\fP option forcesall files to be extracted as text, regardless of the supposed file type..TP.B \-b[non-VMS] treat all files as binary (no text conversions).  This is a shortcutfor \fB\-\-\-a\fP..TP.B \-b[VMS] auto-convert binary files (see \fB\-a\fP above) to fixed-length,512-byte record format.  Doubling the option (\fB\-bb\fP) forces all filesto be extracted in this format..TP.B \-B[Unix only, and only if compiled with UNIXBACKUP defined] save a backup copyof each overwritten file with a tilde appended (e.g., the old copy of``\fCfoo\fR'' is renamed to ``\fCfoo~\fR'').  This is similar to the defaultbehavior of \fIemacs\fP(1) in many locations..TP.B \-Cmatch filenames case-insensitively.  \fIunzip\fP's philosophy is ``you getwhat you ask for'' (this is also responsible for the \fB\-L\fP/\fB\-U\fPchange; see the relevant options below).  Because some file systems are fullycase-sensitive (notably those under the Unix operating system) and becauseboth ZIP archives and \fIunzip\fP itself are portable across platforms,\fIunzip\fP's default behavior is to match both wildcard and literal filenamescase-sensitively.  That is, specifying ``\fCmakefile\fR'' on the command linewill \fIonly\fP match ``makefile'' in the archive, not ``Makefile'' or``MAKEFILE'' (and similarly for wildcard specifications).  Since this doesnot correspond to the behavior of many other operating/file systems (forexample, OS/2 HPFS, which preserves mixed case but is not sensitive to it),the \fB\-C\fP option may be used to force all filename matches to becase-insensitive.  In the example above, all three files would then match``\fCmakefile\fR'' (or ``\fCmake*\fR'', or similar).  The \fB\-C\fP optionaffects files in both the normal file list and the excluded-file list (xlist)..TP.B \-E[MacOS only] display contents of MacOS extra field during restore operation..TP.B \-F[Acorn only] suppress removal of NFS filetype extension from stored filenames..TP.B \-F[Unix only, and only if compiled with ACORN_FTYPE_NFS defined] translatefiletype information from ACORN RISC OS extra field blocks into aNFS filetype extension and append it to the names of the extracted files.(When the stored filename appears to already have an appended NFS filetypeextension, it is replaced by the info from the extra field.).TP.B \-i[MacOS only] ignore filenames stored in MacOS extra fields. Instead, themost compatible filename stored in the generic part of the entry's headeris used..TP.B \-jjunk paths.  The archive's directory structure is not recreated; all filesare deposited in the extraction directory (by default, the current one)..TP.B \-J[BeOS only] junk file attributes.  The file's BeOS file attributes are notrestored, just the file's data..TP.B \-J

⌨️ 快捷键说明

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