Uncompressing files via SSH

The different commands used to extract various file types via SSH.

zip files

unzip file.zip

.tar files

tar -xvf file.tar

.gz files

gzip -d file.gz

.tar.gz files

gzip -d file.tar.gz

and then

tar -xvf file.tar

.tgz files

tar -xvzf file.tgz