How to Extract .tar.gz in Linux

No Comments
If you are newbie in Linux, you will confuse when you want to install Linux application and it's format file is .tar.gz or .tar.bz2 (tarball). But now you don't need to worry because this post will give you the answer :).

Standard format to extract this tarball file is:

tar xvf filename.tar


If the tarball has also been gzipped (compressed), you can use the following command:

tar xvfz filename.tar.gz

If you only want certain directories from the tarball, do this:

tar xvzf filename.tar.gz */dir.you.want/*

If you have a .tar.bz2 file, then you need bzip2 installed (/usr/ports/archivers/bzip2), and you issue this command:

tar yxf filename.tar.bz2
Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment