funzip.txt 3.9 KB

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