Resources: Linux and Apache
Extracting and Compressing Tar.gz via command line
3 October 2012
With explaining the inner workings of all the switches, you can extract / compress .tar.gz archives easily with the following codes:
Compress .tar.gz
$ tar cvzf archive_name.tar.gz dirname/
Extract .tar.gz
$ tar xvfz archive_name.tar.gz