Unzip

From LQWiki
Jump to navigation Jump to search

unzip is the most straightforward of the decompression utilities. It operates on .zip files created by zip, PKZip, Winzip, or other programs. The term unzip is also used loosely to describe the act of decompressing any compressed data, especially data in the gzip format.

To invoke it, open a Console and enter:

unzip filename

This will create all the appropriate subdirectories. In case there is a password set, you will be prompted for it as in this example:

$ unzip foo.zip
Archive:  foo.zip
[foo.zip] disk.iso password:

Features

-q will make unzip quiet, quite useful to avoid clutter.
-f will extract only newer, or non-existing files, nice for just updating.
-t will test an archive to make sure it's good (zip can fix it many times)

See also