how to extract .tar.gz file in windows code example

Example 1: extract tar.gz

tar -xf archive.tar.gz

Example 2: tar.gz files

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

Example 3: 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

Example 4: open .tar.gz windows

gunzip.exe example.tar.gz

 tar.exe xf example.tar