extract tar.gz windows code example

Example 1: unzip tar.gz

tar -xvf file.tar.gz

Example 2: extract tar gz

tar -xvf archive.tar.gz

Example 3: extract tar.gz

tar -xf archive.tar.gz

Example 4: extract tar.gz linux command line

tar xvzf file.tar.gz

Example 5: tar.gz files

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

Example 6: how to extract tar.gz

If your tar file is compressed using a gzip compressor, use the following command to extract it.

    $ tar xvzf file.tar.gz
    
If your tar file is compressed using a bZip2 compressor, use the following command to extract it.

    $ tar xvjf file.tar.bz2