Thursday, 28th August 2008
Although we've already dealt with the most common forms of compression, you may (rarely) encounter .zip and .rar files that you want to extract. These can be dealt with by the unzip and unrar commands.
Unzip unzips a zip file. Unrar uncompresses a .rar file.
# extract the contents of file.zip
$ unzip file.zip
# extract the contents of file.rar
$ unrar x file.rar
The 'x' character used in the unrar example tells unrar to extract (there are other actions available, see the manual page).
# the manual page for unzip
man unzip
# the manual page for unrar.
man unrar