b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

HOWTO: Open a TAR File.

by Jon on October 8th, 2005

There are several different combinations of tar balls out there and each of them has their own way to ‘unzip’ them (to steal a Windows-ism). Developers and vendors make their files available in any way they please, but typically they make a TAR file and then compress it.

First, TAR is a program that stands for ‘Tape ARchive’. It takes a bunch of files and puts them into one file, affectionately called a tarball. The tarball is just the collection of files, it is not compressed. Tarball file names usually take the following form:

file.tar

Usually the tarball is then compressed using either GZip or BZip2. It is common courtesy for the resulting file to be named in such a way that the end user can tell how it has been compressed so they know how to uncompress it. Common file name conventions are:

  • file.tar.gz: This file is a tarball that has been compressed with GZip
  • file.tgz: Same as above
  • file.tar.bz2: This file is a tarball that has been compressed with BZip2
  • file.tbz: Same as above

To get at the actual file you will need to uncompress it to get the tarball and then untar the tarball. This could be done in two steps as in:

  1. For bzip2 files: bunzip2 file.tar.bz2 or bunzip2 file.tbz
  2. tar -xvf the resultant tarball
  1. For GZip file: gunzip file.tar.gz or gunzip file.tgz
  2. tar -xvf the resultant tarball

Or you can do it in one step by using:

  • tar -zxvf file.tar.gz or file.tgz
  • tar -xvf file.tar.bz or file.tbz

There are many GUI tools available to deal with archived files such as Ark in KDE, so you may never have to go down to the command line to do this. But if you do - these commands should help!

POSTED IN: How To

3 opinions for HOWTO: Open a TAR File.

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing