~ubuntu-branches/ubuntu/precise/unzip/precise-proposed

« back to all changes in this revision

Viewing changes to funzip.txt

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-06-06 17:57:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040606175746-nl7p2dgp3aobyc2c
Tags: upstream-5.51
ImportĀ upstreamĀ versionĀ 5.51

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
FUNZIP(1L)                                             FUNZIP(1L)
 
3
 
 
4
NAME
 
5
       funzip  -  filter  for  extracting from a ZIP archive in a
 
6
       pipe
 
7
 
 
8
SYNOPSIS
 
9
       funzip [-password] [input[.zip|.gz]]
 
10
 
 
11
ARGUMENTS
 
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
 
 
21
DESCRIPTION
 
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
 
 
48
EXAMPLES
 
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
 
 
59
Info-ZIP               22 May 2004 (v3.94)                      1
 
60
 
 
61
FUNZIP(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
 
 
71
BUGS
 
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
 
 
92
SEE ALSO
 
93
       gzip(1L), unzip(1L), unzipsfx(1L), zip(1L),  zipcloak(1L),
 
94
       zipinfo(1L), zipnote(1L), zipsplit(1L)
 
95
 
 
96
URL
 
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
 
 
102
AUTHOR
 
103
       Mark Adler (Info-ZIP)
 
104
 
 
105
Info-ZIP               22 May 2004 (v3.94)                      2
 
106