|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Extract files from a zip archive
zip [-Z] [-dflpquxz[abjnoqsCLMXV]] file[.zip] [file(s) ...] [-x xfile(s) ...] [-d exdir]
All supported hosts.
- Automatically convert any text files.
- Extract all files as text files.
- Match files case-insensitively.
- -d exdir
- Extract files into exdir.
- Freshen the existing files.
- Junk the path to the file; do not make directories.
- Convert some names to lowercase.
- -l ("el")
- List archive files (short format).
- Pipe all output through an internal pager that's similar to the more command.
- Never overwrite existing files.
- Overwrite existing files without prompting.
- Extract files to pipe (stdout).
- Perform operations quietly. Use -ll ("el" "el") to make them quieter.
- Test the archive files.
- Update existing files and create new ones if needed.
- Retain VMS file version numbers.
- Be verbose or print diagnostic version information.
- Restore user and group (UID/GID) information.
- -x xlist
- Exclude the files in the xlist.
- ZipInfo mode. If the first option on the command line is -Z, the remaining options are taken as ZipInfo options.
The unzip utility lists, tests, or extracts files from a ZIP archive. The default behavior (with no options) is to extract into the current directory (and subdirectories below it) all files from the specified ZIP archive. A companion program, zip, creates ZIP archives; both programs are compatible with archives created by PKZIP and PKUNZIP.
Extract all members of the archive letters.zip into the current directory and subdirectories below it, creating any subdirectories as necessary, using unzip:
Extract all members of letters.zip into the current directory only:
unzip -j letters
Test letters.zip. Use the following command to print only a summary message indicating whether the archive is all right or not:
unzip -tq letters
Test all zipfiles in the current directory, and print only the summaries:
unzip -tq \*.zip
Extract all members of letters.zip whose names end in .tex, to standard output, auto-convert to the local end-of-line convention, and pipe the output into more:
unzip -ca letters \*.tex | more
Extract the binary file paper1.dvi to standard output, and pipe it to a printing program:
unzip -p articles paper1.dvi | dvips
Extract newer versions of the files already in the current directory and create any files not already there:
unzip -uo sources
Display a diagnostic screen showing which unzip and zipinfo options are stored in environment variables:
See whether decryption support was compiled with the files:
See the compiler that unzip used:
- A set of default
options for unzip. For example:
- The operation succeeded.
- A generic error in the zipfile format was detected, but processing may have completed successfully anyway; a warning was generated in the process.
- A severe error in the zipfile format was detected; processing probably failed immediately.
- unzip was unable to allocate memory for one or more buffers during program initialization.
- unzip was unable to allocate memory or unable to obtain a tty to read the decryption password(s).
- unzip was unable to allocate memory during decompression to disk.
- The specified zipfiles were not found.
- Invalid options were specified on the command line.
- No matching files were found.
- The disk is, or was, full during extraction.
- The end of the ZIP archive was encountered prematurely.
- The user aborted unzip prematurely with Ctrl-C or a similar command.
- Testing or extraction of one or more files failed, due to unsupported compression methods or unsupported decryption.
- No files were found, due to bad decryption password(s). If even one file is successfully processed, however, the exit status is 1.
Backing Up and Recovering Data in the Neutrino User's Guide