506 lines
16 KiB
HTML
506 lines
16 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of UNZIPSFX</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>UNZIPSFX</H1>
|
|
Section: User Commands (1)<BR>Updated: 20 April 2009 (v6.0)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
unzipsfx - self-extracting stub for prepending to ZIP archives
|
|
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B><name of unzipsfx+archive combo></B> [<B>-cfptuz</B>[<B>ajnoqsCLV$</B>]]
|
|
[<I>file(s)</I> ... [<B>-x</B> <I>xfile(s)</I> ...]]
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<I>unzipsfx</I> is a modified version of <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) designed to be
|
|
prepended to existing ZIP archives in order to form self-extracting archives.
|
|
Instead of taking its first non-flag argument to be the zipfile(s) to be
|
|
extracted, <I>unzipsfx</I> seeks itself under the name by which it was invoked
|
|
and tests or extracts the contents of the appended archive. Because the
|
|
executable stub adds bulk to the archive (the whole purpose of which is to
|
|
be as small as possible), a number of the less-vital capabilities in regular
|
|
<I>unzip</I> have been removed. Among these are the usage (or help) screen,
|
|
the listing and diagnostic functions (<B>-l</B> and <B>-v</B>), the ability
|
|
to decompress older compression formats (the ``reduce,'' ``shrink'' and
|
|
``implode'' methods). The ability to extract to a directory other than
|
|
the current one can be selected as a compile-time option, which is now enabled
|
|
by default since UnZipSFX version 5.5. Similarly, decryption is supported as
|
|
a compile-time option but should be avoided unless the attached archive
|
|
contains encrypted files. Starting with release 5.5, another compile-time
|
|
option adds a simple ``run command after extraction'' feature. This feature
|
|
is currently incompatible with the ``extract to different directory''
|
|
feature and remains disabled by default.
|
|
<P>
|
|
|
|
<B>Note that
|
|
self-extracting archives made with</B> <I>unzipsfx</I> <B>are no more (or less)
|
|
portable across different operating systems than is
|
|
the</B> <I>unzip</I> <B>executable itself.</B> In general a self-extracting
|
|
archive made on
|
|
a particular Unix system, for example, will only self-extract under the same
|
|
flavor of Unix. Regular <I>unzip</I> may still be used to extract the
|
|
embedded archive as with any normal zipfile, although it will generate
|
|
a harmless warning about extra bytes at the beginning of the zipfile.
|
|
<I>Despite this</I>, however, the self-extracting archive is technically
|
|
<I>not</I> a valid ZIP archive, and PKUNZIP may be unable to test or extract
|
|
it. This limitation is due to the simplistic manner in which the archive
|
|
is created; the internal directory structure is not updated to reflect the
|
|
extra bytes prepended to the original zipfile.
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>ARGUMENTS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">[<I>file(s)</I>]<DD>
|
|
An optional list of archive members to be processed.
|
|
Regular expressions (wildcards) similar to those in Unix <I><A HREF="/cgi-bin/man/man2html?1+egrep">egrep</A></I>(1)
|
|
may be used to match multiple members. These wildcards may contain:
|
|
<DL COMPACT><DT id="2"><DD>
|
|
<DL COMPACT>
|
|
<DT id="3">*<DD>
|
|
matches a sequence of 0 or more characters
|
|
<DT id="4">?<DD>
|
|
matches exactly 1 character
|
|
<DT id="5">[...]<DD>
|
|
matches any single character found inside the brackets; ranges are specified
|
|
by a beginning character, a hyphen, and an ending character. If an exclamation
|
|
point or a caret (`!' or `^') follows the left bracket, then the range of
|
|
characters within the brackets is complemented (that is, anything <I>except</I>
|
|
the characters inside the brackets is considered a match).
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="6"><DD>
|
|
(Be sure to quote any character that might otherwise be interpreted or
|
|
modified by the operating system, particularly under Unix and VMS.)
|
|
<DT id="7">[<B>-x</B> <I>xfile(s)</I>]<DD>
|
|
An optional list of archive members to be excluded from processing.
|
|
Since wildcard characters match directory separators (`/'), this option
|
|
may be used to exclude any files that are in subdirectories. For
|
|
example, ``foosfx *.[ch] -x */*'' would extract all C source files
|
|
in the main directory, but none in any subdirectories. Without the <B>-x</B>
|
|
option, all C source files in all directories within the zipfile would be
|
|
extracted.
|
|
</DL>
|
|
<P>
|
|
|
|
If <I>unzipsfx</I> is compiled with SFX_EXDIR defined, the following option
|
|
is also enabled:
|
|
<DL COMPACT>
|
|
<DT id="8">[<B>-d</B> <I>exdir</I>]<DD>
|
|
An optional directory to which to extract files. By default, all files
|
|
and subdirectories are recreated in the current directory; the <B>-d</B>
|
|
option allows extraction in an arbitrary directory (always assuming one
|
|
has permission to write to the directory). The option and directory may
|
|
be concatenated without any white space between them, but note that this
|
|
may cause normal shell behavior to be suppressed. In particular,
|
|
``-d ~'' (tilde) is expanded by Unix C shells into the name
|
|
of the user's home directory, but ``-d~'' is treated as a
|
|
literal subdirectory ``<B>~</B>'' of the current directory.
|
|
|
|
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<I>unzipsfx</I> supports the following <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) options: <B>-c</B>
|
|
and <B>-p</B> (extract to standard output/screen), <B>-f</B> and <B>-u</B>
|
|
(freshen and update existing files upon extraction), <B>-t</B> (test
|
|
archive) and <B>-z</B> (print archive comment). All normal listing options
|
|
(<B>-l</B>, <B>-v</B> and <B>-Z</B>) have been removed, but the testing
|
|
option (<B>-t</B>) 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.
|
|
<P>
|
|
|
|
See <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) for a more complete description of these options.
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>MODIFIERS</H2>
|
|
|
|
<I>unzipsfx</I> currently supports all <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) modifiers: <B>-a</B>
|
|
(convert text files), <B>-n</B> (never overwrite), <B>-o</B> (overwrite
|
|
without prompting), <B>-q</B> (operate quietly), <B>-C</B> (match names
|
|
case-insensitively), <B>-L</B> (convert uppercase-OS names to lowercase),
|
|
<B>-j</B> (junk paths) and <B>-V</B> (retain version numbers); plus the
|
|
following operating-system specific options: <B>-X</B> (restore VMS
|
|
owner/protection info), <B>-s</B> (convert spaces in filenames to underscores
|
|
[DOS, OS/2, NT]) and <B>-$</B> (restore volume label [DOS, OS/2, NT, Amiga]).
|
|
<P>
|
|
|
|
(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.)
|
|
<P>
|
|
|
|
See <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) for a more complete description of these modifiers.
|
|
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>ENVIRONMENT OPTIONS</H2>
|
|
|
|
<I>unzipsfx</I> uses the same environment variables as <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) does,
|
|
although this is likely to be an issue only for the person creating and
|
|
testing the self-extracting archive. See <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) for details.
|
|
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>DECRYPTION</H2>
|
|
|
|
Decryption is supported exactly as in <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1); that is, interactively
|
|
with a non-echoing prompt for the password(s). See <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) for
|
|
details. Once again, note that if the archive has no encrypted files there
|
|
is no reason to use a version of <I>unzipsfx</I> with decryption support;
|
|
that only adds to the size of the archive.
|
|
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTORUN COMMAND</H2>
|
|
|
|
When <I>unzipsfx</I> was compiled with CHEAP_SFX_AUTORUN defined, a simple
|
|
``command autorun'' feature is supported. You may enter a command into the
|
|
Zip archive comment, using the following format:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
$AUTORUN$>[command line string]
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
When <I>unzipsfx</I> recognizes the ``$AUTORUN$>'' token at the beginning
|
|
of the Zip archive comment, the remainder of the first line of the comment
|
|
(until the first newline character) is passed as a shell command to the
|
|
operating system using the C rtl ``system'' function. Before executing
|
|
the command, <I>unzipsfx</I> displays the command on the console and prompts
|
|
the user for confirmation. When the user has switched off prompting by
|
|
specifying the <B>-q</B> option, autorun commands are never executed.
|
|
<P>
|
|
|
|
In case the archive comment contains additional lines of text, the remainder
|
|
of the archive comment following the first line is displayed normally, unless
|
|
quiet operation was requested by supplying a <B>-q</B> option.
|
|
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
To create a self-extracting archive <I>letters</I> from a regular zipfile
|
|
<I>letters.zip</I> and change the new archive's permissions to be
|
|
world-executable under Unix:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
cat unzipsfx letters.zip > letters
|
|
chmod 755 letters
|
|
zip -A letters
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To create the same archive under MS-DOS, OS/2 or NT (note the use of the
|
|
<B>/b</B> [binary] option to the <I>copy</I> command):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
copy /b unzipsfx.exe+letters.zip letters.exe
|
|
zip -A letters.exe
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Under VMS:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
copy unzipsfx.exe,letters.zip letters.exe
|
|
letters == "$currentdisk:[currentdir]letters.exe"
|
|
zip -A letters.exe
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
(The VMS <I>append</I> command may also be used. The second command installs
|
|
the new program as a ``foreign command'' capable of taking arguments. The
|
|
third line assumes that Zip is already installed as a foreign command.)
|
|
Under AmigaDOS:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
MakeSFX letters letters.zip UnZipSFX
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
(MakeSFX is included with the UnZip source distribution and with Amiga
|
|
binary distributions. ``zip -A'' doesn't work on Amiga self-extracting
|
|
archives.)
|
|
To test (or list) the newly created self-extracting archive:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters -t
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To test <I>letters</I> quietly, printing only a summary message indicating
|
|
whether the archive is OK or not:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters -tqq
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To extract the complete contents into the current directory, recreating all
|
|
files and subdirectories as necessary:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To extract all *.txt files (in Unix quote the `*'):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters *.txt
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To extract everything <I>except</I> the *.txt files:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters -x *.txt
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To extract only the README file to standard output (the screen):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters -c README
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To print only the zipfile comment:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
letters -z
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>LIMITATIONS</H2>
|
|
|
|
The principle and fundamental limitation of <I>unzipsfx</I> is that it is
|
|
not portable across architectures or operating systems, and therefore
|
|
neither are the resulting archives. For some architectures there is
|
|
limited portability, however (e.g., between some flavors of Intel-based Unix).
|
|
<P>
|
|
|
|
Another problem with the current implementation is that any archive
|
|
with ``junk'' prepended to the beginning technically is no longer a zipfile
|
|
(unless <I><A HREF="/cgi-bin/man/man2html?1+zip">zip</A></I>(1) is used to adjust the zipfile offsets appropriately,
|
|
as noted above). <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) takes note of the prepended bytes
|
|
and ignores them since some file-transfer protocols, notably MacBinary, are
|
|
also known to prepend junk. But PKWARE's archiver suite may not be able to
|
|
deal with the modified archive unless its offsets have been adjusted.
|
|
<P>
|
|
|
|
<I>unzipsfx</I> 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 full
|
|
or relative path must be given. If a user attempts to extract the archive
|
|
from a directory in the PATH other than the current one, <I>unzipsfx</I> will
|
|
print 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 that provide the full path name, so the archive may be invoked
|
|
from anywhere in the user's path. The situation is not known for AmigaDOS,
|
|
Atari TOS, MacOS, etc.
|
|
<P>
|
|
|
|
As noted above, a number of the normal <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) functions have
|
|
been removed in order to make <I>unzipsfx</I> smaller: usage and diagnostic
|
|
info, listing functions and extraction to other directories. Also, only
|
|
stored and deflated files are supported. The latter limitation is mainly
|
|
relevant to those who create SFX archives, however.
|
|
<P>
|
|
|
|
VMS users must know how to set up self-extracting archives as foreign
|
|
commands in order to use any of <I>unzipsfx</I>'s options. This is not
|
|
necessary for simple extraction, but the command to do so then becomes,
|
|
e.g., ``run letters'' (to continue the examples given above).
|
|
<P>
|
|
|
|
<I>unzipsfx</I> on the Amiga requires the use of a special program, MakeSFX,
|
|
in order to create working self-extracting archives; simple concatenation
|
|
does not work. (For technically oriented users, the attached archive is
|
|
defined as a ``debug hunk.'') There may be compatibility problems between
|
|
the ROM levels of older Amigas and newer ones.
|
|
<P>
|
|
|
|
All current bugs in <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) exist in <I>unzipsfx</I> as well.
|
|
|
|
|
|
<A NAME="lbAM"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<I>unzipsfx</I>'s exit status (error level) is identical to that of
|
|
<I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1); see the corresponding man page.
|
|
|
|
|
|
<A NAME="lbAN"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?1+funzip">funzip</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+zip">zip</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+zipcloak">zipcloak</A></I>(1),
|
|
<I><A HREF="/cgi-bin/man/man2html?1+zipgrep">zipgrep</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+zipinfo">zipinfo</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+zipnote">zipnote</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+zipsplit">zipsplit</A></I>(1)
|
|
|
|
|
|
|
|
<A NAME="lbAO"> </A>
|
|
<H2>URL</H2>
|
|
|
|
The Info-ZIP home page is currently at
|
|
|
|
|
|
<PRE>
|
|
<A HREF="http://www.info-zip.org/pub/infozip/">http://www.info-zip.org/pub/infozip/</A>
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
<PRE>
|
|
<A HREF="ftp://ftp.info-zip.org/pub/infozip/">ftp://ftp.info-zip.org/pub/infozip/</A> .
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAP"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
Greg Roelofs was responsible for the basic modifications to UnZip necessary
|
|
to create UnZipSFX. See <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1) for the current list of Zip-Bugs
|
|
authors, or the file CONTRIBS in the UnZip source distribution for the
|
|
full list of Info-ZIP contributors.
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="12"><A HREF="#lbAE">ARGUMENTS</A><DD>
|
|
<DT id="13"><A HREF="#lbAF">OPTIONS</A><DD>
|
|
<DT id="14"><A HREF="#lbAG">MODIFIERS</A><DD>
|
|
<DT id="15"><A HREF="#lbAH">ENVIRONMENT OPTIONS</A><DD>
|
|
<DT id="16"><A HREF="#lbAI">DECRYPTION</A><DD>
|
|
<DT id="17"><A HREF="#lbAJ">AUTORUN COMMAND</A><DD>
|
|
<DT id="18"><A HREF="#lbAK">EXAMPLES</A><DD>
|
|
<DT id="19"><A HREF="#lbAL">LIMITATIONS</A><DD>
|
|
<DT id="20"><A HREF="#lbAM">DIAGNOSTICS</A><DD>
|
|
<DT id="21"><A HREF="#lbAN">SEE ALSO</A><DD>
|
|
<DT id="22"><A HREF="#lbAO">URL</A><DD>
|
|
<DT id="23"><A HREF="#lbAP">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:29 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|