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

📄 unzipsfx.1

📁 压缩算法的源代码
💻 1
字号:
.\" 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..\".\" unzipsfx.1 by Greg Roelofs.\".\" =========================================================================.\" define .Y macro (for user-command examples; normal Courier font):.de Y.ft CW.in +4n.nf\&\\$1.ft.in.fi...\" =========================================================================.TH UNZIPSFX 1L "28 Aug 94 (v5.12)".SH NAMEunzipsfx \- self-extracting stub for prepending to ZIP archives.PD.\" =========================================================================.SH SYNOPSIS\fB<name of unzipsfx+archive combo>\fP [\fB\-cfptuz\fP[\fBajnoqsCLV$\fP]][\fIfile(s)\fP\ .\|.\|. [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.]].PD.\" =========================================================================.SH DESCRIPTION\fIunzipsfx\fP is a modified version of \fIunzip\fP(1L) designed to be prependedto existing ZIP archives in order to form self-extracting archives.  Insteadof taking its first non-flag argument to be the zipfile(s) to be extracted, \fIunzipsfx\fP seeks itself under the name by which it was invoked and tests or extracts the contents of the appended archive.  Because theexecutable stub adds bulk to the archive (the whole purpose of which is tobe as small as possible), a number of the regular version's less-vital capabilities have been removed.  Among these are the usage (or help) screen,the listing and diagnostic functions (\fB\-l\fP and \fB\-v\fP), the ability to decompress older compression formats (the ``reduce,'' ``shrink'' and ``implode'' methods), and the ability to extract to a directory other than the current one.  Decryption is supported as a compile-time option but should be avoided unless the attached archive contains encrypted files..LP\fBNote thatself-extracting archives made with\fP \fIunzipsfx\fP \fBare no more (or less)portable across different operating systems than is the\fP \fIunzip\fP \fBexecutable itself.\fP  In general a self-extracting archive made ona particular Unix system, for example, will only self-extract under the sameflavor of Unix.  Regular \fIunzip\fP may still be used to extract theembedded archive as with any normal zipfile, although it will generatea harmless warning about extra bytes at the beginning of the zipfile..PD.\" =========================================================================.SH ARGUMENTS.IP [\fIfile(s)\fP]An optional list of archive members to be processed.Regular expressions (wildcards) similar to those in Unix \fIegrep\fP(1)may be used to match multiple members.  These wildcards 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 of characters 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 which might otherwise be interpreted ormodified by the operating system, particularly under Unix and VMS.).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 which are in subdirectories.  Forexample, ``\fCfoosfx *.[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.Unlike in \fIunzip\fP(1L), the \fB\-x\fP option may only be used if one ormore \fIfiles\fP are given.  This is because there is no zipfile separatingthe normal options from the \fB\-x\fP option, so \fIunzipsfx\fP sees it asanother normal option.  For historical reasons, the ``normal'' \fB\-x\fP is silently ignored.  See the \fBEXAMPLES\fP section below..LPIf \fIunzipsfx\fP is compiled with SFX_EXDIR defined, the following optionis also enabled:.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).  The option and directory maybe concatenated without any white space between them, but note that thismay cause normal shell behavior to be suppressed.  In particular,``\fC\-d\ ~\fR'' (tilde) is expanded by Unix C shells into the name of the user's home directory, but ``\fC\-d~\fR'' is treated as aliteral subdirectory ``\fB~\fP'' of the current directory.  As with \fB\-x\fP, the \fB\-d\fP option may only be used if one or more \fIfiles\fPare given..PD.\" =========================================================================.SH OPTIONS\fIunzipsfx\fP supports the following \fIunzip\fP(1L) options:  \fB\-c\fPand \fB\-p\fP (extract to standard output/screen), \fB\-f\fP and \fB\-u\fP(freshen and update existing files upon extraction), \fB\-t\fP (testarchive) and \fB\-z\fP (print archive comment).  All normal listing options(\fB\-l\fP, \fB\-v\fP and \fB\-Z\fP) have been removed, but the testingoption (\fB\-t\fP) may be used as a ``poor man's'' listing.  Alternatively,those creating self-extracting archives may wish to include a short listing in the zipfile comment..LPSee \fIunzip\fP(1L) for a more complete description of these options..PD.\" =========================================================================.SH MODIFIERS\fIunzipsfx\fP currently supports all \fIunzip\fP(1L) modifiers:  \fB\-a\fP (convert text files), \fB\-n\fP (never overwrite), \fB\-o\fP (overwrite without prompting), \fB\-q\fP (operate quietly), \fB\-C\fP (match names case-insenstively), \fB\-L\fP (convert uppercase-OS names to lowercase),\fB\-j\fP (junk paths) and \fB\-V\fP (retain version numbers); plus thefollowing operating-system specific options:  \fB\-X\fP (restore VMS owner/protection info), \fB\-s\fP (convert spaces in filenames to underscores[DOS, OS/2, NT]) and \fB\-$\fP (restore volume label [DOS, OS/2, NT, Amiga])..LP(Support for regular ASCII text-conversion may be removed in future versions, since it is simple enough for the archive's creator to ensure that text files have the appropriate format for the local OS.  EBCDIC conversion will of course continue to be supported since the zipfile format implies ASCII storage of text files.).LPSee \fIunzip\fP(1L) for a more complete description of these modifiers..PD.\" =========================================================================.SH ENVIRONMENT OPTIONS\fIunzipsfx\fP uses the same environment variables as \fIunzip\fP(1L) does,although this is likely to be an issue only for the person creating andtesting the self-extracting archive.  See \fIunzip\fP(1L) for details..PD.\" =========================================================================.SH DECRYPTIONDecryption is supported exactly as in \fIunzip\fP(1L); that is, interactivelywith a non-echoing prompt for the password(s).  See \fIunzip\fP(1L) for details.  Once again, note that if the archive has no encrypted files there is no reason to use a version of \fIunzipsfx\fP with decryption support;that only adds to the size of the archive..PD.\" =========================================================================.SH EXAMPLESTo create a self-extracting archive \fIletters\fP from a regular zipfile \fIletters.zip\fP and change the new archive's permissions to be world-executable under Unix:.LP.PD 0.Y "cat unzipsfx letters.zip > letters".Y "chmod 755 letters".PD.LPTo create the same archive under MS-DOS, OS/2 or NT (note the use of the\fB/b\fP [binary] option to the \fIcopy\fP command):.LP.Y "copy /b unzipsfx.exe+letters.zip letters.exe".LPUnder VMS:.LP.Y "copy unzipsfx.exe,letters.zip letters.exe".Y "letters == ""$currentdisk:[currentdir]letters.exe""".LP(The VMS \fIappend\fP command may also be used.  The second command installsthe new program as a ``foreign command'' capable of taking arguments.)To test (or list) the newly created self-extracting archive:.LP.Y "letters \-t".LPTo test \fIletters\fP quietly, printing only a summary message indicatingwhether the archive is OK or not:.LP.Y "letters \-tq".LPTo extract the complete contents into the current directory, recreating allfiles and subdirectories as necessary:.LP.Y "letters".LPTo extract all \fC*.txt\fP files (in Unix quote the `*'):.LP.Y "letters *.txt".LPTo extract everything \fIexcept\fP the \fC*.txt\fP files:.LP.Y "letters * -x *.txt".LP(Note that with regular \fIunzip\fP(1L) it would not be necessary to use the first `*'; ``\fCunzip letters -x *.txt\fP'' would work equally well.With \fIunzipsfx\fP the \fB\-x\fP option would be silently ignored and the effect would be the same as in the previous example, i.e., the oppositeof what was intended.)To extract only the README file to standard output (the screen):.LP.Y "letters -c README".LPTo print only the zipfile comment:.LP.Y "letters \-z".PD.\" =========================================================================.SH LIMITATIONSThe principle and fundamental limitation of \fIunzipsfx\fP is that it isnot portable across architectures or operating systems, and thereforeneither are the resulting archives.  For some architectures there is limited portability, however (e.g., between some flavors of Intel-based Unix)..LP\fIunzipsfx\fP has no knowledge of the user's PATH, so in general an archive must either be in the current directory when it is invoked, or else a fullor relative path must be given.  If a user attempts to extract the archivefrom a directory in the PATH other than the current one, \fIunzipsfx\fP willprint a warning to the effect, ``can't find myself.''  This is always true under Unix and may be true in some cases under MS-DOS, depending on the compiler used (Microsoft C fully qualifies the program name, but other compilers may not).  Under OS/2 and NT there are operating-system calls available which provide the full path name, so the archive may be invoked from anywhere in the user's path.  The situation is not known for Atari TOS, MacOS, etc..LPAs noted above, a number of the normal \fIunzip\fP(1L) functions havebeen removed in order to make \fIunzipsfx\fP smaller:  usage and diagnosticinfo, listing functions and extraction to other directories.  Also, onlystored and deflated files are supported.  The latter limitation is mainlyrelevant to those who create SFX archives, however..LPVMS users must know how to set up self-extracting archives as foreign commands in order to use any of \fIunzipsfx\fP's options.  This is notnecessary for simple extraction, but the command to do so then becomes,e.g., ``\fCrun letters\fR'' (to continue the examples given above)..LP\fIunzipsfx\fP is not supported on the Amiga because of the way the loaderworks; the entire archive contents would be loaded into memory by default.It may be possible to work around this by defining the attached archive tobe a ``debug hunk,'' but compatibility problems between the ROM levels ofolder Amigas and newer ones are likely to cause problems regardless..LPAll current bugs in \fIunzip\fP(1L) exist in \fIunzipsfx\fP as well..PD.\" =========================================================================.SH DIAGNOSTICS\fIunzipsfx\fP's exit status (error level) is identical to that of\fIunzip\fP(1L); see the corresponding man page..PD.\" =========================================================================.SH SEE ALSO\fIfunzip\fP(1L), \fIunzip\fP(1L), \fIzip\fP(1L), \fIzipcloak\fP(1L),\fIzipgrep\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L).PD.\" =========================================================================.SH AUTHORSGreg Roelofs was responsible for the basic modifications to UnZip necessaryto create UnZipSFX.  See \fIunzip\fP(1L) for the current list of zip-bugsauthors, or the file CONTRIBS in the UnZip source distribution for thefull list of Info-ZIP contributors..PD

⌨️ 快捷键说明

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