unzip – list, test and extract compressed files in a ZIP archive

Synopsis

unzip filename.zip

Description

Unzip will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems. 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(1L), creates ZIP archives; both programs are compatible with archives created by PKWARE’s PKZIP and PKUNZIP for MS-DOS, but in many cases the program options or default behaviors differ.

Source: http://linux.die.net/man/1/unzip

Linux / Unix rmdir command

About rmdir

Deletes a directory.

Syntax

rmdir [OPTION]... DIRECTORY...

–ignore-fail-on-non-empty ignore each failure that is solely because a directory is non-empty.
-p, –parents Remove DIRECTORY and its ancestors. E.g., `rmdir -p a/b/c’ is similar to `rmdir a/b/c a/b a’.
-v, –verbose output a diagnostic for every directory processed.
–version output version information and exit.
Examples

rmdir mydir - removes the directory mydir
rm -r directory - would remove a directory, even if files existed in that directory.

Source: http://www.computerhope.com/unix/urmdir.htm

How do I unpack a compressed tar file

Unzipping a .gz file

gunzip filename.tar.gz

This replaces filename.tar.gz with filename.tar

Extracting tar files

tar xvf filename.tar

Note: Always move to an empty directory before unpacking a tarfile. When you unpack a tarfile its contents are written to the current directory. Any file or directory with the same name as the contents of the tarfile will be overwritten!

A quick method

Alternatively, you can unpack a compressed/zipped tarfile using the zcat or gzcat command. (gzcat is a local alias for the GNU zcat command). This leaves the compressed .Z or .gz tarfile intact. For example:

zcat filename.tar.Z  | tar xvf -

or

gzcat filename.tar.gz | tar xvf -

The zcat command recreates the uncompressed tarfile, which is then piped into the tar command to extract the files.

Source: http://info.eps.surrey.ac.uk/FAQ/unpack.html