2 .\" Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>
3 .\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" $FreeBSD: revision 180125$
28 .\" $NetBSD: unzip.1,v 1.6 2009/08/24 08:38:39 joerg Exp $
35 .Nd extract files from a ZIP archive
43 The following options are available:
46 When extracting a text file, convert DOS-style line endings to
47 Unix-style line endings.
49 Match file names case-insensitively.
51 Extract to stdout/screen.
52 When extracting files from the zipfile, they are written to stdout.
55 but doesn't suppress normal output.
57 Extract files into the specified directory rather than the current
61 Extract only files from the zipfile if a file with the same name
62 already exists on disk and is older than the former.
63 Otherwise, the file is silently skipped.
65 Ignore directories stored in the zipfile; instead, extract all files
66 directly into the extraction directory.
68 Convert the names of the extracted files and directories to lowercase.
70 List, rather than extract, the contents of the zipfile.
73 When extracting a file from the zipfile, if a file with the same name
74 already exists on disk, the file is silently skipped.
77 When extracting a file from the zipfile, if a file with the same name
78 already exists on disk, the existing file is replaced with the file
82 When extracting files from the zipfile, they are written to stdout.
83 The normal output is suppressed as if
87 Quiet: print less information while extracting.
89 Test: do not extract anything, but verify the checksum of every file
93 When extracting a file from the zipfile, if a file with the same name
94 already exists on disk, the existing file is replaced with the file
95 from the zipfile if and only if the latter is newer than the former.
96 Otherwise, the file is silently skipped.
98 List verbosely, rather than extract, the contents of the zipfile.
101 by using the long listing.
102 Note that most of the data is currently fake and does not reflect the
103 content of the archive.
105 Exclude files matching the pattern
109 Note that only one of
118 environment variable is defined, the
120 command-line option has no effect, and additional debugging
121 information will be printed to
126 utility aims to be sufficiently compatible with other implementations
127 to serve as a drop-in replacement in the context of the
130 No attempt has been made to replicate functionality which is not
131 required for that purpose.
133 For compatibility reasons, command-line options will be recognized if
134 they are listed not only before but also after the name of the
139 option should only affect files which are marked as text files in the
140 zipfile's central directory.
143 library reads zipfiles sequentially, and does not use the central
144 directory, that information is not available to the
149 utility will assume that a file is a text file if no non-ASCII
150 characters are present within the first block of data decompressed for
152 If non-ASCII characters appear in subsequent blocks of data, a warning
157 utility is only able to process ZIP archives handled by
159 Depending on the installed version of
161 this may or may not include self-extracting archives.
172 utility and this manual page were written by
173 .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
177 .An Tim Kientzle Aq kientzle@FreeBSD.org .
181 utility currently does not support asking the user whether to
182 overwrite or skip a file that already exists on disk.
183 To be on the safe side, it will fail if it encounters a file that
184 already exists and neither the
188 command line option was specified.