BSDUNZIP
Section: User Commands (1)
Index
Return to Main Contents
BSD mandoc
NAME
bsdunzip
- extract files from a ZIP archive
SYNOPSIS
[-
aCcfjLlnopqtuvy
]
[{ -
O | -I } encoding
]
[-
d dir
]
[-
x pattern
]
[-
P password
]
zipfile
[
member ...
]
DESCRIPTION
The following options are available:
- -a
-
When extracting a text file, convert DO-style line endings to
Uni-style line endings.
- -C
-
Match file names cas-insensitively.
- -c
-
Extract to stdout/screen.
When extracting files from the zipfile, they are written to stdout.
This is similar to
-p
but does not suppress normal output.
- -d dir
-
Extract files into the specified directory rather than the current
directory.
- -f
-
Update existing.
Extract only files from the zipfile if a file with the same name
already exists on disk and is older than the former.
Otherwise, the file is silently skipped.
- -I encoding
-
- -O encoding
-
Convert filenames from the specified encoding.
- -j
-
Ignore directories stored in the zipfile; instead, extract all files
directly into the extraction directory.
- -L
-
Convert the names of the extracted files and directories to lowercase.
- -l
-
List, rather than extract, the contents of the zipfile.
- -n
-
No overwrite.
When extracting a file from the zipfile, if a file with the same name
already exists on disk, the file is silently skipped.
- -o
-
Overwrite.
When extracting a file from the zipfile, if a file with the same name
already exists on disk, the existing file is replaced with the file
from the zipfile.
- -p
-
Extract to stdout.
When extracting files from the zipfile, they are written to stdout.
The normal output is suppressed as if
-q
was specified.
- -P password
-
Extract encrypted files using a password.
Putting a password on the command line using this option can be
insecure.
- -q
-
Quiet: print less information while extracting.
- -t
-
Test: do not extract anything, but verify the checksum of every file
in the archive.
- -u
-
Update.
When extracting a file from the zipfile, if a file with the same name
already exists on disk, the existing file is replaced with the file
from the zipfile if and only if the latter is newer than the former.
Otherwise, the file is silently skipped.
- -v
-
List verbosely, rather than extract, the contents of the zipfile.
This differs from
-l
by using the long listing.
Note that most of the data is currently fake and does not reflect the
content of the archive.
- -x pattern
-
Exclude files matching the pattern
pattern
- -y
-
Print four digit years in listings instead of two.
- -Z mode
-
Emulate
zipinfo(1L)
mode.
Enabling
zipinfo(1L)
mode changes the way in which additional arguments are parsed.
Currently only
zipinfo(1L)
mode 1 is supported, which lists the file names one per line.
- [member ...]
-
Optional list of members to extract from the zipfile.
Can include patterns, e.g.,
'memberdir/*'
will extract all files and dirs below memberdir.
Note that only one of
-n
-o
and
-u
may be specified.
If specified filename is
Qq - ,
then data is read from
stdin
ENVIRONMENT
If the
UNZIP_DEBUG
environment variable is defined, the
-
q
comman-line option has no effect, and additional debugging
information will be printed to
stderr
COMPATIBILITY
The
utility aims to be sufficiently compatible with other implementations
to serve as a dro-in replacement in the context of the
ports(7)
system.
No attempt has been made to replicate functionality which is not
required for that purpose.
For compatibility reasons, comman-line options will be recognized if
they are listed not only before but also after the name of the
zipfile.
Normally, the
-a
option should only affect files which are marked as text files in the
zipfile's central directory.
Since the
archive(3)
library does not provide access to that information, it is not available
to the
utility.
Instead, the
utility will assume that a file is a text file if no no-ASCII
characters are present within the first block of data decompressed for
that file.
If no-ASCII characters appear in subsequent blocks of data, a warning
will be issued.
The
utility is only able to process ZIP archives handled by
libarchive(3).
Depending on the installed version of
libarchive(3),
this may or may not include sel-extracting or ZIPX archives.
SEE ALSO
libarchive(3)
HISTORY
The
utility appeared in
Fx 8.0 .
AUTHORS
The
utility and this manual page were written by
An Da-Erling Sm/orgrav Aq Mt
des@FreeBSD.org .
It uses the
archive(3)
library developed by
An Tim Kientzle Aq Mt
kientzle@FreeBSD.org .
CAVEATS
The
utility performs two scans of the comman-line for arguments before
and after the archive name, so as to maintain compatibility with
Inf-ZIP unzip.
As a result, the POSIX
`-'
doubl-dash string used to separate options from arguments will need to
be repeated.
For example, to extract a "-a.jpg" from "-b.zip" with overwrite, one
would need to invoke
bsdunzip-o--a.jpg--b.zip
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- ENVIRONMENT
-
- COMPATIBILITY
-
- SEE ALSO
-
- HISTORY
-
- AUTHORS
-
- CAVEATS
-