.tar.gz is a compressed tar archive file created with tar using -z
parameter (gzip compression). You can easily extract this type of file by using tar command.
$ tar xvzf myfile.tar.gz
x
tells tar to extract the archive filev
is for verbose outputz
tells tar to use gzip to decompress the filef
is for the filename, which is defined as the next argumentThis will extract the file in same folder you are at the moment, which is not always the desired outcome. To extract the contents to another folder, use -C
argument with the target path:
$ tar xvzf myfile.tar.gz -C /path/to/folder/