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