1 2FUNZIP(1L) FUNZIP(1L) 3 4NAME 5 funzip - filter for extracting from a ZIP archive in a 6 pipe 7 8SYNOPSIS 9 funzip [-password] [input[.zip|.gz]] 10 11ARGUMENTS 12 [-password] 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. 16 17 [input[.zip|.gz]] 18 Optional input archive file specification. See 19 DESCRIPTION for details. 20 21DESCRIPTION 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. 30 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 40 the console. 41 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- 46 ups to tape. 47 48EXAMPLES 49 To use funzip to extract the first member file of the 50 archive test.zip and to pipe it into more(1): 51 52 funzip test.zip | more 53 54 To use funzip to test the first member file of test.zip 55 (any errors will be reported on standard error): 56 57 funzip test.zip > /dev/null 58 59Info-ZIP 17 February 2002 (v3.94) 1 60 61FUNZIP(1L) FUNZIP(1L) 62 63 To use zip and funzip in place of compress(1) and zcat(1) 64 (or gzip(1L) and gzcat(1L)) for tape backups: 65 66 tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k 67 dd if=/dev/nrst0 ibs=8k | funzip | tar xf - 68 69 (where, for example, nrst0 is a SCSI tape drive). 70 71BUGS 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. 82 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. 88 89 The functionality of funzip should be incorporated into 90 unzip itself (future release). 91 92SEE ALSO 93 gzip(1L), unzip(1L), unzipsfx(1L), zip(1L), zipcloak(1L), 94 zipinfo(1L), zipnote(1L), zipsplit(1L) 95 96URL 97 The Info-ZIP home page is currently at 98 http://www.info-zip.org/pub/infozip/ 99 or 100 ftp://ftp.info-zip.org/pub/infozip/ . 101 102AUTHOR 103 Mark Adler (Info-ZIP) 104 105Info-ZIP 17 February 2002 (v3.94) 2 106 107