]> CyberLeo.Net >> Repos - FreeBSD/releng/8.0.git/blob - usr.bin/unzip/unzip.1
Adjust to reflect 8.0-RELEASE.
[FreeBSD/releng/8.0.git] / usr.bin / unzip / unzip.1
1 .\"-
2 .\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd June 30, 2008
29 .Dt UNZIP 1
30 .Os
31 .Sh NAME
32 .Nm unzip
33 .Nd extract files from a ZIP archive
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl ajLlnoqtu
37 .Op Fl d Ar dir
38 .Ar zipfile
39 .Sh DESCRIPTION
40 .\" ...
41 .Pp
42 The following options are available:
43 .Bl -tag -width Fl
44 .It Fl a
45 When extracting a text file, convert DOS-style line endings to
46 Unix-style line endings.
47 .It Fl d Ar dir
48 Extract files into the specified directory rather than the current
49 directory.
50 .It Fl j
51 Ignore directories stored in the zipfile; instead, extract all files
52 directly into the extraction directory.
53 .It Fl L
54 Convert the names of the extracted files and directories to lowercase.
55 .It Fl l
56 List, rather than extract, the contents of the zipfile.
57 .It Fl n
58 No overwrite.
59 When extacting a file from the zipfile, if a file with the same name
60 already exists on disk, the file is silently skipped.
61 .It Fl o
62 Overwrite.
63 When extacting a file from the zipfile, if a file with the same name
64 already exists on disk, the existing file is replaced with the file
65 from the zipfile.
66 .It Fl q
67 Quiet: print less information while extracting.
68 .It Fl t
69 Test: do not extract anything, but verify the checksum of every file
70 in the archive.
71 .It Fl u
72 Update.
73 When extacting a file from the zipfile, if a file with the same name
74 already exists on disk, the existing file is replaced with the file
75 from the zipfile if and only if the latter is newer than the former.
76 Otherwise, the file is silently skipped.
77 .El
78 .Pp
79 Note that only one of
80 .Fl n ,
81 .Fl o
82 and
83 .Fl u
84 may be specified.
85 .Sh ENVIRONMENT
86 If the
87 .Ev UNZIP_DEBUG
88 environment variable is defined, the
89 .Fl q
90 command-line option has no effect, and additional debugging
91 information will be printed to
92 .Va stderr .
93 .Sh COMPATIBILITY
94 The
95 .Nm
96 utility aims to be sufficiently compatible with other implementations
97 to serve as a drop-in replacement in the context of the
98 .Xr ports 7
99 system.
100 No attempt has been made to replicate functionality which is not
101 required for that purpose.
102 .Pp
103 For compatibility reasons, command-line options will be recognized if
104 they are listed not only before but also after the name of the
105 zipfile.
106 .Pp
107 Normally, the
108 .Fl a
109 option should only affect files which are marked as text files in the
110 zipfile's central directory.
111 Since the
112 .Xr archive 3
113 library reads zipfiles sequentially, and does not use the central
114 directory, that information is not available to the
115 .Nm
116 utility.
117 Instead, the
118 .Nm
119 utility will assume that a file is a text file if no non-ASCII
120 characters are present within the first block of data decompressed for
121 that file.
122 If non-ASCII characters appear in subsequent blocks of data, a warning
123 will be issued.
124 .Pp
125 The
126 .Nm
127 utility is only able to process ZIP archives handled by
128 .Xr libarchive 3 .
129 Depending on the installed version of
130 .Xr libarchive ,
131 this may or may not include self-extracting archives.
132 .Sh BUGS
133 The
134 .Nm
135 utility currently does not support asking the user whether to
136 overwrite or skip a file that already exists on disk.
137 To be on the safe side, it will fail if it encounters a file that
138 already exists and neither the
139 .Fl n
140 nor the
141 .Fl o
142 command line option was specified.
143 .Sh SEE ALSO
144 .Xr libarchive 3
145 .Sh HISTORY
146 The
147 .Nm
148 utility appeared in
149 .Fx 8.0 .
150 .Sh AUTHORS
151 The
152 .Nm
153 utility and this manual page were written by
154 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
155 It uses the
156 .Xr archive 3
157 library developed by
158 .An Tim Kientzle Aq kientzle@FreeBSD.org .