Tar file format



         


In computing, the tar file format is a type of archive file format: the Tape ARchive format. These files are produced by the Unix command tar and were standardized by POSIX.1-1998 and later POSIX.1-2001. It is used widely to archive and unarchive files, which means to accumulate a large collection of files into a single archive file (packer), while preserving file system information such as user and group permissions, dates, and directory structures. In the Unix tradition of "one job, one program", it does not support compression directly.

tar was originally developed for use with sequential access devices such as tape drives, specifically for backup purposes. Somewhere along the line the -f argument was added and tar is now more frequently used as a general archive utility. tar's linear roots can still be seen in its slow partial extraction performance, when it has to read through the whole archive to extract only the final file. Commonly a tar file is referred to as a tarball.

tar is most commonly used in tandem with an external compression utility such as gzip, bzip2 or, formerly, compress, since it has no built in data compression facilities. These compression utilities generally only compress a single file, hence the pairing with tar, which can produce a single file from many files. One might think this requires more steps, but it is possible to use the Unix pipe capability to combine the two steps manually. Also, the GNU version of tar supports the command line options -z (gzip), -j (bzip2), and -Z (compress), which will compress the archive file it creates.

[Top]

Usage

To use bzip2 instead of gzip, simply replace the commands above with bzip2 where gzip is used and bunzip2 where gunzip is used.

Using GNU tar's compression flag feature:

[Top]

Filename extension

[Top]

MIME-Type

[Top]

See also

[Top]




  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License