tar.gz is a format of a gzip compressed tar archived file. It is a common format in distributing files in *nix.

To extract a tar.gz file, the most basic syntax is as the following;

tar xzf filename.tar.gz

and to extract tar.bz2 you can use this command:

tar -jxvf filename.tar.bz2

The command will extract the file to the current working directory. Current versions of the tar program doesn’t require the -z switch, as it auto detects the file format and extract accordingly.

To extract in verbose mode, and to a directory called /target, the following is the syntax;

tar xvf filename.tar.gz -C /targe

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>