ZIP/UNZIP/TAR command in Linux

To Uncompress ————————————————————————-

Unzip a zip file to a folder

unzip filename –d ./destfolder


Untar a pack file

  tar xvf filename.tar

If the tarball has also been gzipped (compressed), you can use the following command:

tar xvfz filename.tar.gz

If you have a .tar.bz2 file, then you need bzip2 installed (/usr/ports/archivers/bzip2), and you issue this command:

  tar yxf filename.tar.bz2

To compress ——————————————————————————–