197 lines
5.6 KiB
HTML
197 lines
5.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of FUNZIP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>FUNZIP</H1>
|
|
Section: User Commands (1)<BR>Updated: 20 April 2009 (v3.95)<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>
|
|
|
|
funzip - filter for extracting from a ZIP archive in a pipe
|
|
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>funzip</B> [<B>-password</B>] [<I>input[.zip|.gz]</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>ARGUMENTS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">[<I>-password</I>]<DD>
|
|
Optional password to be used if ZIP archive is encrypted. Decryption
|
|
may not be supported at some sites. See DESCRIPTION for more details.
|
|
<DT id="2">[<I>input[.zip|.gz]</I>]<DD>
|
|
Optional input archive file specification. See DESCRIPTION for details.
|
|
|
|
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<I>funzip</I>
|
|
|
|
without a file argument acts as a filter; that is, it assumes that a
|
|
ZIP archive (or a <I>gzip</I>'<A HREF="/cgi-bin/man/man2html?1+d">d</A>(1) file) is being piped into
|
|
standard input, and it extracts the first member from the archive to stdout.
|
|
When stdin comes from a tty device,
|
|
<I>funzip</I>
|
|
|
|
assumes that this cannot be a stream of (binary) compressed data and
|
|
shows a short help text, instead.
|
|
If there is a file argument, then input is read from the specified file
|
|
instead of from stdin.
|
|
<P>
|
|
|
|
A password for encrypted zip files can be specified
|
|
on the command line (preceding the file name, if any) by prefixing the
|
|
password with a dash. Note that this constitutes a security risk on many
|
|
systems; currently running processes are often visible via simple commands
|
|
(e.g., <I><A HREF="/cgi-bin/man/man2html?1+ps">ps</A></I>(1) under Unix), and command-line histories can be read.
|
|
If the first entry of the zip file is encrypted and
|
|
no password is specified on the command line, then the user is prompted for
|
|
a password and the password is not echoed on the console.
|
|
<P>
|
|
|
|
Given the limitation on single-member extraction, <I>funzip</I> is most
|
|
useful in conjunction with a secondary archiver program such as <I><A HREF="/cgi-bin/man/man2html?1+tar">tar</A></I>(1).
|
|
The following section includes an example illustrating this usage in the
|
|
case of disk backups to tape.
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
To use <I>funzip</I> to extract the first member file of the archive test.zip
|
|
and to pipe it into <I><A HREF="/cgi-bin/man/man2html?1+more">more</A></I>(1):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
funzip test.zip | more
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To use <I>funzip</I> to test the first member file of test.zip (any errors
|
|
will be reported on standard error):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
funzip test.zip > /dev/null
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To use <I>zip</I> and <I>funzip</I> in place of <I><A HREF="/cgi-bin/man/man2html?1+compress">compress</A></I>(1) and
|
|
<I><A HREF="/cgi-bin/man/man2html?1+zcat">zcat</A></I>(1) (or <I><A HREF="/cgi-bin/man/man2html?1+gzip">gzip</A></I>(1) and <I><A HREF="/cgi-bin/man/man2html?1+gzcat">gzcat</A></I>(1)) for tape backups:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
|
|
dd if=/dev/nrst0 ibs=8k | funzip | tar xf -
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
(where, for example, nrst0 is a SCSI tape drive).
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
When piping an encrypted file into <I>more</I> and allowing <I>funzip</I>
|
|
to prompt for password, the terminal may sometimes be reset to a non-echo
|
|
mode. This is apparently due to a race condition between the two programs;
|
|
<I>funzip</I> changes the terminal mode to non-echo before <I>more</I> reads
|
|
its state, and <I>more</I> then ``restores'' the terminal to this mode before
|
|
exiting. To recover, run <I>funzip</I> on the same file but redirect to
|
|
/dev/null rather than piping into more; after prompting again for the
|
|
password, <I>funzip</I> will reset the terminal properly.
|
|
<P>
|
|
|
|
There is presently no way to extract any member but the first from a ZIP
|
|
archive. This would be useful in the case where a ZIP archive is included
|
|
within another archive. In the case where the first member is a directory,
|
|
<I>funzip</I> simply creates the directory and exits.
|
|
<P>
|
|
|
|
The functionality of <I>funzip</I> should be incorporated into <I>unzip</I>
|
|
itself (future release).
|
|
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?1+gzip">gzip</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+unzip">unzip</A></I>(1), <I><A HREF="/cgi-bin/man/man2html?1+unzipsfx">unzipsfx</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+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="lbAI"> </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="lbAJ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Mark Adler (Info-ZIP)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="3"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="4"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="5"><A HREF="#lbAD">ARGUMENTS</A><DD>
|
|
<DT id="6"><A HREF="#lbAE">DESCRIPTION</A><DD>
|
|
<DT id="7"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="8"><A HREF="#lbAG">BUGS</A><DD>
|
|
<DT id="9"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="10"><A HREF="#lbAI">URL</A><DD>
|
|
<DT id="11"><A HREF="#lbAJ">AUTHOR</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:12 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|