From Knoppix Documentation Wiki
Jump to: navigation, search

What is tar?

In computing, tar is a type of packing file format: the Tape ARchive format. It is used widely in the Unix-like world (including Linux). More recently it is being used in Microsoft Windows alongside the more familiar formats such as zip. Tar is used to accumulate a large collection of files into a single archive file (packer), while preserving filesystem information such as user/group, permissions, date, and directory structure. Tar does not support compression by itself but can seamlessly use compression through other compression utilities.

A tar file (called a "tarball") that is subsequently compressed using gzip usually has an extension of .tar.gz (.tar being the tar file, .gz being added by gzip). Due to the limitations on file extensions on DOS, these are also sometimes called TGZ files.

A tarball that is compressed using bzip2 usually has an extension of .tar.bz2. Bzip2 is a newer utility than gzip and may sometimes produce up to 10-20% smaller files.

How to Unpack a tarball?

Using the GUI

In Knoppix, you can right-click the tarball icon in the Konqueror filemanager or on the desktop. Select "extract". You have options to extract to the present location or extract to another location which you can input.

Using the command-line

The options for using tar from the command-line may be found by typing "man tar". An online manual may also be found here: tar - Linux Command - Unix Command. There are many, many options for tar. A typical selection of options to extract a tar archive is:

tar -xvf filename.tar

Here tar is told to extract ('x'), be verbose and provide more information about its ongoing action ('v') and to work on the filename is provided ('f').

By default tar will extract the archived files to the same location where the tarball is.

Other tar utilities/Frontends found in Knoppix

(work in progress)