The tar Manual: DRAFT - 1. The Uses of Tape Archives
1. The Uses of Tape Archives
The tape archiver tar allows you to store many files in an
archive file or tar file which describes the names and contents
of the constituent files. Later you can extract some or all of these files
from the archive.
Tar files are not restricted to magnetic tapes. The tar program
can equally well use an ordinary file, or a pipe, or any device, as the
archive. But they were originally designed for use with magnetic tapes,
and that is how the name "tar" came about.
Archive files can be used for transporting a group of files from one system
to another: put all relevant files into an archive on one computer system,
transfer the archive to another, and extract the contents there. The basic
transfer medium might be magnetic tape, Internet FTP, or even electronic
mail (though you must encode the archive with uuencode in order to
transport it properly by mail). Both machines do not have to use the same
operating system, as long as they both support the tar program.
A magnetic tape can store several files in sequence, but has no names for them, just relative position on the tape. A tar file or something like it is the only way to store several files on one tape and retain their names. Even when the basic transfer mechanism can keep track of names, as FTP can, the nuisance of handling multiple files, directories, and multiple links, may make a tar file a much easier method.
Archive files are also used for long-term storage, which you can think of as transportation from one time to another.
Piping one tar to another is an easy way to copy a directory's
contents from one disk to another, while preserving the dates, modes, owners
and link-structure of all the files therein.
The GNU version of tar has special features that allow it to be
used to make incremental and full dumps of all the files in a
filesystem.
Go to the first, previous, next, last section, table of contents.