File: funzip.txt

package info (click to toggle)
unzip 5.52-9etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 5,776 kB
  • ctags: 7,140
  • sloc: ansic: 49,152; cpp: 3,978; makefile: 2,310; asm: 1,583; sh: 91
file content (106 lines) | stat: -rw-r--r-- 4,180 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

FUNZIP(1L)                                             FUNZIP(1L)

NAME
       funzip  -  filter  for  extracting from a ZIP archive in a
       pipe

SYNOPSIS
       funzip [-password] [input[.zip|.gz]]

ARGUMENTS
       [-password]
              Optional password to be  used  if  ZIP  archive  is
              encrypted.  Decryption may not be supported at some
              sites.  See DESCRIPTION for more details.

       [input[.zip|.gz]]
              Optional  input  archive  file  specification.  See
              DESCRIPTION for details.

DESCRIPTION
       funzip  without a file argument acts as a filter; that is,
       it assumes that a ZIP archive (or  a  gzip'd(1)  file)  is
       being piped into standard input, and it extracts the first
       member from the archive to stdout.  When stdin comes  from
       a  tty device, funzip assumes that this cannot be a stream
       of (binary) compressed data and shows a short  help  text,
       instead.   If there is a file argument, then input is read
       from the specified file instead of from stdin.

       A password for encrypted zip files can be specified on the
       command  line (preceding the file name, if any) by prefix-
       ing the password with a dash.  Note that this  constitutes
       a  security  risk  on many systems; currently running pro-
       cesses are often visible via simple commands (e.g.,  ps(1)
       under  Unix),  and command-line histories can be read.  If
       the first entry of the zip file is encrypted and no  pass-
       word  is  specified  on the command line, then the user is
       prompted for a password and the password is not echoed  on
       the console.

       Given  the  limitation on single-member extraction, funzip
       is most useful in conjunction with  a  secondary  archiver
       program such as tar(1).  The following section includes an
       example illustrating this usage in the case of disk  back-
       ups to tape.

EXAMPLES
       To  use  funzip  to  extract  the first member file of the
       archive test.zip and to pipe it into more(1):

           funzip test.zip | more

       To use funzip to test the first member  file  of  test.zip
       (any errors will be reported on standard error):

           funzip test.zip > /dev/null

Info-ZIP             28 February 2005 (v3.94)                   1

FUNZIP(1L)                                             FUNZIP(1L)

       To  use zip and funzip in place of compress(1) and zcat(1)
       (or gzip(1L) and gzcat(1L)) for tape backups:

           tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
           dd if=/dev/nrst0 ibs=8k | funzip | tar xf -

       (where, for example, nrst0 is a SCSI tape drive).

BUGS
       When piping an encrypted file into more and allowing  fun-
       zip  to prompt for password, the terminal may sometimes be
       reset to a non-echo mode.  This is  apparently  due  to  a
       race  condition  between  the two programs; funzip changes
       the terminal mode to non-echo before more reads its state,
       and  more  then  ``restores''  the  terminal  to this mode
       before exiting.  To recover, run funzip on the  same  file
       but  redirect  to  /dev/null rather than piping into more;
       after prompting again for the password, funzip will  reset
       the terminal properly.

       There  is  presently  no way to extract any member but the
       first from a ZIP archive.  This would  be  useful  in  the
       case  where  a  ZIP  archive  is  included  within another
       archive.  In the case where the first member is  a  direc-
       tory, funzip simply creates the directory and exits.

       The  functionality  of  funzip should be incorporated into
       unzip itself (future release).

SEE ALSO
       gzip(1L), unzip(1L), unzipsfx(1L), zip(1L),  zipcloak(1L),
       zipinfo(1L), zipnote(1L), zipsplit(1L)

URL
       The Info-ZIP home page is currently at
           http://www.info-zip.org/pub/infozip/
       or
           ftp://ftp.info-zip.org/pub/infozip/ .

AUTHOR
       Mark Adler (Info-ZIP)

Info-ZIP             28 February 2005 (v3.94)                   2