5 funzip - filter for extracting from a ZIP archive in a
9 funzip [-password] [input[.zip|.gz]]
13 Optional password to be used if ZIP archive is
14 encrypted. Decryption may not be supported at some
15 sites. See DESCRIPTION for more details.
18 Optional input archive file specification. See
19 DESCRIPTION for details.
22 funzip without a file argument acts as a filter; that is,
23 it assumes that a ZIP archive (or a gzip'd(1) file) is
24 being piped into standard input, and it extracts the first
25 member from the archive to stdout. When stdin comes from
26 a tty device, funzip assumes that this cannot be a stream
27 of (binary) compressed data and shows a short help text,
28 instead. If there is a file argument, then input is read
29 from the specified file instead of from stdin.
31 A password for encrypted zip files can be specified on the
32 command line (preceding the file name, if any) by prefix-
33 ing the password with a dash. Note that this constitutes
34 a security risk on many systems; currently running pro-
35 cesses are often visible via simple commands (e.g., ps(1)
36 under Unix), and command-line histories can be read. If
37 the first entry of the zip file is encrypted and no pass-
38 word is specified on the command line, then the user is
39 prompted for a password and the password is not echoed on
42 Given the limitation on single-member extraction, funzip
43 is most useful in conjunction with a secondary archiver
44 program such as tar(1). The following section includes an
45 example illustrating this usage in the case of disk back-
49 To use funzip to extract the first member file of the
50 archive test.zip and to pipe it into more(1):
52 funzip test.zip | more
54 To use funzip to test the first member file of test.zip
55 (any errors will be reported on standard error):
57 funzip test.zip > /dev/null
59 Info-ZIP 17 February 2002 (v3.94) 1
63 To use zip and funzip in place of compress(1) and zcat(1)
64 (or gzip(1L) and gzcat(1L)) for tape backups:
66 tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
67 dd if=/dev/nrst0 ibs=8k | funzip | tar xf -
69 (where, for example, nrst0 is a SCSI tape drive).
72 When piping an encrypted file into more and allowing fun-
73 zip to prompt for password, the terminal may sometimes be
74 reset to a non-echo mode. This is apparently due to a
75 race condition between the two programs; funzip changes
76 the terminal mode to non-echo before more reads its state,
77 and more then ``restores'' the terminal to this mode
78 before exiting. To recover, run funzip on the same file
79 but redirect to /dev/null rather than piping into more;
80 after prompting again for the password, funzip will reset
81 the terminal properly.
83 There is presently no way to extract any member but the
84 first from a ZIP archive. This would be useful in the
85 case where a ZIP archive is included within another
86 archive. In the case where the first member is a direc-
87 tory, funzip simply creates the directory and exits.
89 The functionality of funzip should be incorporated into
90 unzip itself (future release).
93 gzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L),
94 zipinfo(1L), zipnote(1L), zipsplit(1L)
97 The Info-ZIP home page is currently at
98 http://www.info-zip.org/pub/infozip/
100 ftp://ftp.info-zip.org/pub/infozip/ .
103 Mark Adler (Info-ZIP)
105 Info-ZIP 17 February 2002 (v3.94) 2