Uncompressing a file on Unix.

Suppose that you want to uncompress a file in Unix. Based on the suffix of the filename, pick of the following three sections and follow its directions

TGZ:The file has the suffix tgz

If your file is called SomeFile.tgz,then type
gunzip SomeFile.tgz | tar -zxvf

TAR.GZ: The file has the suffix .tar.gz

If your file is called SomeFile.tar.gz,then type
gunzip SomeFile.tar.gz | tar -zxvf

TAR: The file has the suffix .tar

If your file is called SomeFile.tar,then type
tar -xvf SomeFile.tar

ZIP: The file has the suffix .zip

If your file is called SomeFile.zip,then type
unzip SomeFile.zip