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

📄 zipinfo.1

📁 压缩解压,是unzip540的升级,这个外国网站摘来的源码,是evb编写.
💻 1
📖 第 1 页 / 共 2 页
字号:
.PPAdding the \fB\-T\fP option changes the file date and time to decimalformat:.PP.X "-rw-rws---  1.5 unx    2802 t-     538 defX 910811.134804 perms.2660".PPNote that because of limitations in the MS-DOS format used to store filetimes, the seconds field is always rounded to the nearest even second.For Unix files this is expected to change in the next major releases of\fIzip\fP(1L) and \fIunzip\fP..PPIn addition to individual file information, a default zipfile listingalso includes header and trailer lines:.PP.X "Archive:  OS2.zip   5453 bytes   5 files".X ",,rw,       1.0 hpf     730 b- i4:3 26-Jun-92 23:40 Contents".X ",,rw,       1.0 hpf    3710 b- i4:3 26-Jun-92 23:33 makefile.os2".X ",,rw,       1.0 hpf    8753 b- i8:3 26-Jun-92 15:29 os2unzip.c".X ",,rw,       1.0 hpf      98 b- stor 21-Aug-91 15:34 unzip.def".X ",,rw,       1.0 hpf      95 b- stor 21-Aug-91 17:51 zipinfo.def".X "5 files, 13386 bytes uncompressed, 4951 bytes compressed:  63.0%".PPThe header line gives the name of the archive, its total size, and thetotal number of files; the trailer gives the number of files listed,their total uncompressed size, and their total compressed size (notincluding any of \fIzip\fP's internal overhead).  If, however, one ormore \fIfile(s)\fP are provided, the header and trailer lines arenot listed.  This behavior is also similar to that of Unix's ``\fCls \-l\fR'';it may be overridden by specifying the \fB\-h\fP and \fB\-t\fP optionsexplicitly.In such a case the listing format must also be specified explicitly,since \fB\-h\fP or \fB\-t\fP (or both) in the absence of other options impliesthat ONLY the header or trailer line (or both) is listed.  See the\fBEXAMPLES\fP section below for a semi-intelligible translation of thisnonsense..PPThe verbose listing is mostly self-explanatory.  It also lists filecomments and the zipfile comment, if any, and the type and number of bytesin any stored extra fields.  Currently known types of extra fields includePKWARE's authentication (``AV'') info; OS/2 extended attributes; VMSfilesystem info, both PKWARE and Info-ZIP versions; Macintosh resourceforks; Acorn/Archimedes SparkFS info; and so on.  (Notethat in the case of OS/2 extended attributes--perhaps the most commonuse of zipfile extra fields--the size of the stored EAs as reported by\fIzipinfo\fP may not match the number given by OS/2's \fIdir\fP command:OS/2 always reports the number of bytes required in 16-bit format, whereas\fIzipinfo\fP always reports the 32-bit storage.).PPAgain, the compressed size figures of the individual entries include the12 extra header bytes for encrypted entries.  In contrast, the archive totalcompressed size and the average compression ratio shown in the summarybottom line are calculated \fBwithout\fP the extra 12 header bytes ofencrypted entries..PD.\" =========================================================================.SH "ENVIRONMENT OPTIONS"Modifying \fIzipinfo\fP's default behavior via options placed inan environment variable can be a bit complicated to explain, due to\fIzipinfo\fP's attempts to handle various defaults in an intuitive,yet Unix-like, manner.  (Try not to laugh.)  Nevertheless, there is someunderlying logic.  In brief,there are three ``priority levels'' of options:  the default options;environment options, which can override or add to the defaults; andexplicit options given by the user, which can override or add toeither of the above..PPThe default listing format, as noted above, corresponds roughlyto the "\fCzipinfo \-hst\fR" command (except when individual zipfile membersare specified).A user who prefers the long-listing format (\fB\-l\fP) can make use of the\fIzipinfo\fP's environment variable to change this default:.TPUnix Bourne shell:\f(CW\&ZIPINFO=\-l; export ZIPINFO\fP.TPUnix C shell:\f(CW\&setenv ZIPINFO \-l\fP.TPOS/2 or MS-DOS:\f(CW\&set ZIPINFO=\-l\fP.TPVMS (quotes for \fIlowercase\fP):\f(CW\&define ZIPINFO_OPTS "\-l"\fP.EE.PPIf, in addition, the user dislikes the trailer line, \fIzipinfo\fP'sconcept of ``negative options'' may be used to override the defaultinclusion of the line.  This is accomplished by preceding the undesiredoption with one or more minuses:  e.g., ``\fC\-l\-t\fR'' or ``\fC\-\-tl\fR'',in this example.  The first hyphen is the regular switch character, but theone before the `t' is a minus sign.  The dual use of hyphens may seem alittle awkward, but it's reasonably intuitive nonetheless:  simply ignorethe first hyphen and go from there.  It is also consistent with the behaviorof the Unix command \fInice\fP(1)..PPAs suggested above, the default variable names are ZIPINFO_OPTS for VMS(where the symbol used to install \fIzipinfo\fP as a foreign commandwould otherwise be confused with the environment variable), and ZIPINFOfor all other operating systems.  For compatibility with \fIzip\fP(1L),ZIPINFOOPT is also accepted (don't ask).  If both ZIPINFO and ZIPINFOOPTare defined, however, ZIPINFO takes precedence.  \fIunzip\fP's diagnosticoption (\fB\-v\fP with no zipfile name) can be used to check the valuesof all four possible \fIunzip\fP and \fIzipinfo\fP environment variables..PD.\" =========================================================================.SH EXAMPLESTo get a basic, short-format listing of the complete contents of a ZIParchive \fIstorage.zip\fP, with both header and totals lines, use onlythe archive name as an argument to zipinfo:.PP.EXzipinfo storage.EE.PPTo produce a basic, long-format listing (not verbose), including header andtotals lines, use \fB\-l\fP:.PP.EXzipinfo \-l storage.EE.PPTo list the complete contents of the archive without header and totalslines, either negate the \fB\-h\fP and \fB\-t\fP options or else specify thecontents explicitly:.PP.EXzipinfo \-\-h\-t storagezipinfo storage \e*.EE.PP(where the backslash is required only if the shell would otherwise expandthe `*' wildcard, as in Unix when globbing is turned on--double quotes aroundthe asterisk would have worked as well).  To turn off the totals line bydefault, use the environment variable (C shell is assumed here):.PP.EXsetenv ZIPINFO \-\-tzipinfo storage.EE.PPTo get the full, short-format listing of the first example again, giventhat the environment variable is set as in the previous example, it isnecessary to specify the \fB\-s\fP option explicitly, since the \fB\-t\fPoption by itself implies that ONLY the footer line is to be printed:.PP.EXsetenv ZIPINFO \-\-tzipinfo \-t storage            \fR[only totals line]\fPzipinfo \-st storage           \fR[full listing]\fP.EE.PPThe \fB\-s\fP option, like \fB\-m\fP and \fB\-l\fP, includes headers andfooters by default, unless otherwise specified.  Since the environmentvariable specified no footers and that has a higher precedence than thedefault behavior of \fB\-s\fP, an explicit \fB\-t\fP option was necessaryto produce the full listing.  Nothing was indicated about the header,however, so the \fB\-s\fP option was sufficient.  Note that both the\fB\-h\fP and \fB\-t\fP options, when used by themselves or witheach other, override any default listing of member files; only the headerand/or footer are printed.  This behavior is useful when \fIzipinfo\fP isused with a wildcard zipfile specification; the contents of all zipfilesare then summarized with a single command..PPTo list information on a single file within the archive, in medium format,specify the filename explicitly:.PP.EXzipinfo \-m storage unshrink.c.EE.PPThe specification of any member file, as in this example, will overridethe default header and totals lines; only the single line of informationabout the requested file will be printed.  This is intuitively what onewould expect when requesting information about a single file.  For multiplefiles, it is often useful to know the total compressed and uncompressedsize; in such cases \fB\-t\fP may be specified explicitly:.PP.EXzipinfo \-mt storage "*.[ch]" Mak\e*.EE.PPTo get maximal information about the ZIP archive, use the verboseoption.  It is usually wise to pipe the output into a filter such asUnix \fImore\fP(1) if the operating system allows it:.PP.EXzipinfo \-v storage | more.EE.PPFinally, to see the most recently modified files in the archive, usethe \fB\-T\fP option in conjunction with an external sorting utilitysuch as Unix \fIsort\fP(1) (and \fIsed\fP(1) as well, in this example):.PP.EXzipinfo \-T storage | sort -nr -k 7 | sed 15q.EE.PPThe \fB\-nr\fP option to \fIsort\fP(1) tells it to sort numericallyin reverse order rather than in textual order, and the \fB\-k\ 7\fP optiontells it to sort on the seventh field.  Thisassumes the default short-listing format; if \fB\-m\fP or \fB\-l\fP isused, the proper \fIsort\fP(1) option would be \fB\-k\ 8\fP.Older versions of \fIsort\fP(1) do not support the \fB\-k\fP option,but you can use the traditional \fB\+\fP option instead, e.g.,\fB\+6\fP instead of \fB\-k\ 7\fP.  The \fIsed\fP(1)command filters out all but the first 15 lines of the listing.  Futurereleases of \fIzipinfo\fP may incorporate date/time and filename sortingas built-in options..PD.\" =========================================================================.SH TIPSThe author finds it convenient to define an alias \fIii\fP for \fIzipinfo\fPon systems that allow aliases (or, on other systems, copy/rename theexecutable, create a link or create a command file with the name \fIii\fP).The \fIii\fP usage parallels the common \fIll\fP alias for long listings inUnix, and the similarity between the outputs of the two commands wasintentional..PD.\" =========================================================================.SH BUGSAs with \fIunzip\fP, \fIzipinfo\fP's \fB\-M\fP (``more'') option is overlysimplistic in its handling of screen output; as noted above, it fails to detectthe wrapping of long lines and may thereby cause lines at the top of the screento be scrolled off before being read.  \fIzipinfo\fP should detect and treateach occurrence of line-wrap as one additional line printed.  This requiresknowledge of the screen's width as well as its height.  In addition,\fIzipinfo\fP should detect the true screen geometry on all systems..PP\fIzipinfo\fP's listing-format behavior is unnecessarily complex and shouldbe simplified.  (This is not to say that it will be.).PP.\" =========================================================================.SH "SEE ALSO"\fIls\fP(1), \fIfunzip\fP(1L), \fIunzip\fP(1L), \fIunzipsfx\fP(1L),\fIzip\fP(1L), \fIzipcloak\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L).PD.\" =========================================================================.SH URLThe Info-ZIP home page is currently at.EX\fChttp://www.info-zip.org/pub/infozip/\fR.EEor.EX\fCftp://ftp.info-zip.org/pub/infozip/\fR ..EE.PD.\" =========================================================================.SH AUTHORGreg ``Cave Newt'' Roelofs.  ZipInfo contains pattern-matching codeby Mark Adler and fixes/improvements by many others.  Please refer to theCONTRIBS file in the UnZip source distribution for a more complete list.

⌨️ 快捷键说明

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