Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

funzip (1)

Name

funzip - filter for extracting from a ZIP archive in a pipe

Synopsis

funzip [-password] [archive[.zip|.gz]]

Description

FUNZIP(1)                   General Commands Manual                  FUNZIP(1)



NAME
       funzip - filter for extracting from a ZIP archive in a pipe

SYNOPSIS
       funzip [-password] [archive[.zip|.gz]]

ARGUMENTS
       [-password]
              Optional  password  to  be  used  if  ZIP  archive is encrypted.
              Encryption support can be disabled at build time.  See  DESCRIP-
              TION for more details.

       [archive[.zip|.gz]]
              Optional  input archive file specification.  See DESCRIPTION for
              details.

DESCRIPTION
       fUnZip without a file argument acts as a filter; that  is,  it  assumes
       that  a  ZIP archive (or a gzip'd(1) file) is being piped into standard
       input, and it extracts the first (non-directory) member  from  the  ar-
       chive  to  standard  output (stdout).  When standard input (stdin) is a
       terminal (tty) device, fUnZip assumes that this cannot be a  stream  of
       (binary)  compressed  data  and shows a short usage guide, instead.  If
       there is a file argument, then input is read from  the  specified  file
       instead of from stdin.

       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
       hyphen.   Note  that  this constitutes a security risk on many systems;
       running processes are often visible via simple  commands  (e.g.,  ps(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.

       Given the limitation on single-member extraction, fUnZip is most useful
       in  conjunction  with a secondary archiver program such as tar(1).  The
       following section includes an example illustrating this  usage  in  the
       case of disk backups to tape.

EXAMPLES
       Use  fUnZip  to extract the first (non-directory) member of the archive
       "test.zip", and to pipe it into more(1):

           funzip test.zip | more

       Use fUnZip to test the first (non-directory) member of "test.zip" (with
       any error messages sent to standard error (stderr)):

           funzip test.zip > /dev/null

       Use Zip and fUnZip in place of compress(1) and zcat(1) (or gzip(1L) and
       gzcat(1L)) for tape backups:

           tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
           dd if=/dev/nrst0 ibs=8k | funzip | tar xf -

       (where, for example, nrst0 is a SCSI tape drive).

BUGS
       When piping an encrypted file into more and allowing fUnZip  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;
       fUnZip  changes  the  terminal  mode  to non-echo before more reads its
       state, and more then "restores" the terminal to this mode before  exit-
       ing.  To recover, run fUnZip on the same file but redirect to /dev/null
       rather than piping into more.  After prompting again for the  password,
       fUnZip should reset the terminal properly.

       There  is no way to extract any member except the first (non-directory)
       from a ZIP archive, but fUnZip will  skip  archive  members  which  are
       directories, and extract the first member which is not a directory.

       Only Deflate compression and Traditional ZIP encryption are supported.

       The  functionality  of  fUnZip should be incorporated into UnZip itself
       (in some future release).


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | compress/unzip   |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
SEE ALSO
       gzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L),  zipinfo(1L),
       zipnote(1L), zipsplit(1L)

URL
       The Info-ZIP main Web page is:
                  http://www.info-zip.org/

       FTP access is available, too:
                  ftp://ftp.info-zip.org/pub/infozip/

AUTHOR
       Mark Adler (Info-ZIP)



NOTES
       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source     was    downloaded    from     http://antinode.info/ftp/info-
       zip/unzip610c23.zip

       Further information about this software can be found on the open source
       community website at http://www.info-zip.org/UnZip.html.



Info-ZIP                      06 Nov 2013 (v4.10)                    FUNZIP(1)