Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6725 | siemargl | 1 | .\" Copyright (c) 1990-2009 Info-ZIP. All rights reserved. |
2 | .\" |
||
3 | .\" See the accompanying file LICENSE, version 2009-Jan-02 or later |
||
4 | .\" (the contents of which are also included in unzip.h) for terms of use. |
||
5 | .\" If, for some reason, all these files are missing, the Info-ZIP license |
||
6 | .\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html |
||
7 | .\" |
||
8 | .\" funzip.1 by Greg Roelofs and others. |
||
9 | .\" |
||
10 | .\" ========================================================================= |
||
11 | .\" define .EX/.EE (for multiline user-command examples; normal Courier font) |
||
12 | .de EX |
||
13 | .in +4n |
||
14 | .nf |
||
15 | .ft CW |
||
16 | .. |
||
17 | .de EE |
||
18 | .ft R |
||
19 | .fi |
||
20 | .in -4n |
||
21 | .. |
||
22 | .\" ========================================================================= |
||
23 | .TH FUNZIP 1L "20 April 2009 (v3.95)" "Info-ZIP" |
||
24 | .SH NAME |
||
25 | funzip \- filter for extracting from a ZIP archive in a pipe |
||
26 | .PD |
||
27 | .SH SYNOPSIS |
||
28 | \fBfunzip\fP [\fB\-password\fP] [\fIinput[.zip|.gz]\fP] |
||
29 | .\" ========================================================================= |
||
30 | .SH ARGUMENTS |
||
31 | .IP [\fI\-password\fP] |
||
32 | Optional password to be used if ZIP archive is encrypted. Decryption |
||
33 | may not be supported at some sites. See DESCRIPTION for more details. |
||
34 | .IP [\fIinput[.zip|.gz]\fP] |
||
35 | Optional input archive file specification. See DESCRIPTION for details. |
||
36 | .PD |
||
37 | .\" ========================================================================= |
||
38 | .SH DESCRIPTION |
||
39 | .I funzip |
||
40 | without a file argument acts as a filter; that is, it assumes that a |
||
41 | ZIP archive (or a \fIgzip\fP'd(1) file) is being piped into |
||
42 | standard input, and it extracts the first member from the archive to stdout. |
||
43 | When stdin comes from a tty device, |
||
44 | .I funzip |
||
45 | assumes that this cannot be a stream of (binary) compressed data and |
||
46 | shows a short help text, instead. |
||
47 | If there is a file argument, then input is read from the specified file |
||
48 | instead of from stdin. |
||
49 | .PP |
||
50 | A password for encrypted zip files can be specified |
||
51 | on the command line (preceding the file name, if any) by prefixing the |
||
52 | password with a dash. Note that this constitutes a security risk on many |
||
53 | systems; currently running processes are often visible via simple commands |
||
54 | (e.g., \fIps\fP(1) under Unix), and command-line histories can be read. |
||
55 | If the first entry of the zip file is encrypted and |
||
56 | no password is specified on the command line, then the user is prompted for |
||
57 | a password and the password is not echoed on the console. |
||
58 | .PP |
||
59 | Given the limitation on single-member extraction, \fIfunzip\fP is most |
||
60 | useful in conjunction with a secondary archiver program such as \fItar\fP(1). |
||
61 | The following section includes an example illustrating this usage in the |
||
62 | case of disk backups to tape. |
||
63 | .PD |
||
64 | .\" ========================================================================= |
||
65 | .SH EXAMPLES |
||
66 | To use \fIfunzip\fP to extract the first member file of the archive test.zip |
||
67 | and to pipe it into \fImore\fP(1): |
||
68 | .PP |
||
69 | .EX |
||
70 | funzip test.zip | more |
||
71 | .EE |
||
72 | .PP |
||
73 | To use \fIfunzip\fP to test the first member file of test.zip (any errors |
||
74 | will be reported on standard error): |
||
75 | .PP |
||
76 | .EX |
||
77 | funzip test.zip > /dev/null |
||
78 | .EE |
||
79 | .PP |
||
80 | To use \fIzip\fP and \fIfunzip\fP in place of \fIcompress\fP(1) and |
||
81 | \fIzcat\fP(1) (or \fIgzip\fP(1L) and \fIgzcat\fP(1L)) for tape backups: |
||
82 | .PP |
||
83 | .EX |
||
84 | tar cf \- . | zip \-7 | dd of=/dev/nrst0 obs=8k |
||
85 | dd if=/dev/nrst0 ibs=8k | funzip | tar xf \- |
||
86 | .EE |
||
87 | .PP |
||
88 | (where, for example, nrst0 is a SCSI tape drive). |
||
89 | .PD |
||
90 | .\" ========================================================================= |
||
91 | .SH BUGS |
||
92 | When piping an encrypted file into \fImore\fP and allowing \fIfunzip\fP |
||
93 | to prompt for password, the terminal may sometimes be reset to a non-echo |
||
94 | mode. This is apparently due to a race condition between the two programs; |
||
95 | \fIfunzip\fP changes the terminal mode to non-echo before \fImore\fP reads |
||
96 | its state, and \fImore\fP then ``restores'' the terminal to this mode before |
||
97 | exiting. To recover, run \fIfunzip\fP on the same file but redirect to |
||
98 | /dev/null rather than piping into more; after prompting again for the |
||
99 | password, \fIfunzip\fP will reset the terminal properly. |
||
100 | .PP |
||
101 | There is presently no way to extract any member but the first from a ZIP |
||
102 | archive. This would be useful in the case where a ZIP archive is included |
||
103 | within another archive. In the case where the first member is a directory, |
||
104 | \fIfunzip\fP simply creates the directory and exits. |
||
105 | .PP |
||
106 | The functionality of \fIfunzip\fP should be incorporated into \fIunzip\fP |
||
107 | itself (future release). |
||
108 | .PD |
||
109 | .\" ========================================================================= |
||
110 | .SH "SEE ALSO" |
||
111 | \fIgzip\fP(1L), \fIunzip\fP(1L), \fIunzipsfx\fP(1L), \fIzip\fP(1L), |
||
112 | \fIzipcloak\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L) |
||
113 | .PD |
||
114 | .\" ========================================================================= |
||
115 | .SH URL |
||
116 | The Info-ZIP home page is currently at |
||
117 | .EX |
||
118 | \fChttp://www.info-zip.org/pub/infozip/\fR |
||
119 | .EE |
||
120 | or |
||
121 | .EX |
||
122 | \fCftp://ftp.info-zip.org/pub/infozip/\fR . |
||
123 | .EE |
||
124 | .PD |
||
125 | .\" ========================================================================= |
||
126 | .SH AUTHOR |
||
127 | Mark Adler (Info-ZIP) |