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

📄 zipinfo.1

📁 压缩算法的源代码
💻 1
📖 第 1 页 / 共 2 页
字号:
which has been ``removed'':.LP.X "-rw-rws---  1.5 unx    2802 t- 81% defX 11-Aug-91 13:48 perms.2660".LPIn this example, the file has been compressed by more than a factor offive; the compressed data are only 19% of the original size.  The longformat gives the compressed file's size in bytes, instead:.LP.X "-rw-rws---  1.5 unx    2802 t-     538 defX 11-Aug-91 13:48 perms.2660".LPAdding the \fB\-T\fP option changes the file date and time to decimalformat:.LP.X "-rw-rws---  1.5 unx    2802 t-     538 defX 910811.134804 perms.2660".LPNote 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..LPIn addition to individual file information, a default zipfile listingalso includes header and trailer lines:.LP.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%".LPThe 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 or more \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 options explicitly.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..LPThe verbose listing is mostly self-explanatory.  It also lists filecomments and the zipfile comment, if any, and the type and number of bytes in any stored extra fields.  Currently known types of extra fields include PKWARE's authentication (``AV'') info; OS/2 extended attributes; VMS filesystem 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.).PD.\" =========================================================================.SH ENVIRONMENT OPTIONSModifying \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 some underlying logic.  In brief, there are three ``priority levels'' of options:  the default options;environment options, which can override or add to the defaults; and explicit options given by the user, which can override or add to either of the above..LPThe default listing format, as noted above, corresponds roughlyto the "\fCzipinfo \-hst\fP" 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:.LP.DT.ft CW.in +4n.ta \w'ZIPINFO=\-l; export ZIPINFO'u+4n.in.ft.PD 0.Y "ZIPINFO=\-l; export ZIPINFO\t\fRUnix Bourne shell".Y "setenv ZIPINFO \-l\t\fRUnix C shell".Y "set ZIPINFO=\-l\t\fROS/2 or MS-DOS".Y "define ZIPINFO_OPTS ""\-l""\t\fRVMS (quotes for \fIlowercase\fP)".PD.LPIf, 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 the one before the `t' is a minus sign.  The dual use of hyphens may seem a little awkward, but it's reasonably intuitive nonetheless:  simply ignore the first hyphen and go from there.  It is also consistent with the behaviorof the Unix command \fInice\fP(1)..LPAs 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 ZIP archive \fIstorage.zip\fP, with both header and totals lines, use onlythe archive name as an argument to zipinfo:.LP.Y "zipinfo storage".LPTo produce a basic, long-format listing (not verbose), including header andtotals lines, use \fB\-l\fP:.LP.Y "zipinfo \-l storage".LPTo 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 the contents explicitly:.LP.PD 0.Y "zipinfo \-\-h\-t storage".Y "zipinfo storage \e*".PD.LP(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):.LP.PD 0.Y "setenv ZIPINFO \-\-t".Y "zipinfo storage".PD.LPTo 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:.LP.PD 0.Y "setenv ZIPINFO \-\-t".Y "zipinfo \-t storage\t\fR[only totals line]".Y "zipinfo \-st storage\t\fR[full listing]".PD.LPThe \fB\-s\fP option, like \fB\-m\fP and \fB\-l\fP, includes headers andfooters by default, unless otherwise specified.  Since the environment variable specified no footers and that has a higher precedence than the default behavior of \fB\-s\fP, an explicit \fB\-t\fP option was necessary to 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 zipfiles are then summarized with a single command..LPTo list information on a single file within the archive, in medium format,specify the filename explicitly:.LP.Y "zipinfo \-m storage unshrink.c".LPThe 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:.LP.Y "zipinfo \-mt storage ""*.[ch]"" Mak\e*".LPTo get maximal information about the ZIP archive, use the verbose option.  It is usually wise to pipe the output into a filter such as Unix \fImore\fP(1) if the operating system allows it:.LP.Y "zipinfo \-v storage | more".LPFinally, 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 \fItail\fP(1) as well, in this example):.LP.Y "zipinfo \-T storage | sort -n +6 | tail -15".LPThe \fB\-n\fP option to \fIsort\fP(1) tells it to sort numericallyrather than in ASCII order, and the \fB\+6\fP option tells it to sorton the sixth field after the first one (i.e., 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\+7\fP.  The \fItail\fP(1) command filters out all but the last 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 which 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 in Unix, and the similarity between the outputs of the two commands was intentional..PD.\" =========================================================================.SH BUGSNone known at this time, but we're always delighted to find a good one..LP.\" =========================================================================.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 AUTHORGreg Roelofs (a.k.a.\ Cave Newt).  ZipInfo contains pattern-matching code by Mark Adler and fixes/improvements by many others.  Please refer to the CONTRIBS file in the UnZip source distribution for a more complete list.

⌨️ 快捷键说明

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