Zip / Unzip
I believe that zip is common to most all distributions. It does not do the best job of compression but it works. To unzip a file from a command line in Linux you use
To Zip a file you only need to reverse that command
Tar stands for “Tape ARchive” it was used for backing up to tape. If you are a frequent Linux user you will have seen a .tar file. Tar is quick an dirty. It does not have the best compression but it is fast.
To un-tar or extract a tar file
To Tar a directory or file
GZ or Tar.GZ
This is probably the most common file type you will see when using Linux. This does very good compression and is quick.
To untar and un-gzip (decompress) a file
To Compression and Tar gzip a directory
The switches in the call:
- -z: Compress archive using gzip program
- -c: Create archive
- -v: Verbose this will display progress to the terminal
- -f: Archive File name