Tar
Table of Contents
The Tar program provides the ability to create tar archives,
as well as various other kinds of manipulation.
For example, you can use Tar on
previously created archives to extract files,
to store additional files,
or to update or list files which were already stored.
Initially, tar archives were used to
store files conveniently on magnetic tape.
The name "Tar" comes from this use;
it stands for tape archiver.
Despite the utility's name, Tar can direct its output to
available devices, files, or other programs (using pipes),
it can even access remote devices or files (as archives).
Additional information about the project, including links to the
project development page and file downloads, is available from the
GNU software directory.
Stable versions of GNU Tar can be found on in the subdirectory
/gnu/tar/ on your favorite GNU mirror. For other ways to obtain Tar, please read
How to get GNU Software
Latest intermediate snapshots are available from tar
snapshot ftp. Alpha
releases are distributed from
alpha.gnu.org.
For information about CVS access, alpha releases, patches, etc.,
please see the
project's home page.
GNU Tar is fully documented. Complete documentation in Texinfo format
is included in the distribution. An
online manual is available in various formats.
If you wish to send a bug report, a feature request, or simply to share
your thoughts about GNU tar, please write to
<bug-tar@gnu.org>. Notice, that this is a moderated list,
i.e. postings from non-subscribers are held until one of moderators has
time to approve them. To subscribe to the list, visit
http://mail.gnu.org/mailman/listinfo/bug-tar.
| 2009-03-05 |
1.22 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped
cpio archive and
its signature.
|
- Support for xz compression (--xz option)
- Short option
-J is reassigned as a shortcut
for --xz
- The option
-I is a shortcut for
--use-compress-program
- The
--no-recursive option works with --incremental
|
| 2008-12-27 |
1.21 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
- New short option
-J, an alias for --lzma
- New option
--lzop
- New option
--no-auto-compress,
Cancels the effect of previous --auto-compress (-a)
option
- New option
--no-null
Cancels the effect of previous --null option.
- Compressed format recognition
If tar is unable to determine archive compression format,
it falls back to using archive suffix to determine it.
- VCS support
Using --exclude-vcs handles also files used
internally by Bazaar, Mercurial and Darcs.
- Transformation scope flags
Name transformation expressions understand additional
flags that control type of archive members affected by
them. The flags are:
- r
- Apply transformation to regular archive
members.
- s
- Apply transformation to symbolic link targets.
- h
- Apply transformation to hard link targets.
The corresponding upper-case letters negate the meaning,
so that H means do not apply
transformation to hard link targets.
The scope flags are listed in the third part of
a s expression, e.g.:
$ tar --transform 's|^|/usr/local/|S'
The default is rsh, which means that
transformations are applied to both regular archive
members and to the targets of symbolic and hard links.
If several transform expressions are used, the default flags
can be changed using flags= statement placed
before the expressions, e.g.:
$ tar --transform 'flags=S;s|^|/usr/local/|'
- Bugfixes:
- The
--null option disabled handling of
tar options in list files. This is fixed.
- Fixed record size autodetection. If detected record
size differs from the expected value (either default, or
set on the command line), tar prints a warning if
verbosity level is set to 1 or greater, i.e. if either
-t or -v option is given.
|
| 2008-04-14 |
1.20 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
- New option
--auto-compress (-a)
With --create, selects compression algorithm basing on
the suffix of the archive file name.
- New option
--lzma
Selects LZMA compression algorithm.
- New option
--hard-dereference
During archive creation, dereferences hard links and stores the
files they refer to, instead of creating usual hard link members
(type '1').
- New option
--checkpoint-action
This action allows to specify an action to be executed upon hitting
a checkpoint. Recognized actions are: dot,
echo (the default), echo=string,
ttyout=string, exec=cmdline,
and sleep=value. Any number of
--checkpoint-action options can be specified, the
actions will be executed in order of their appearance in the
command line. See section
3.8 "Checkpoints" for a complete description.
- New options
--no-check-device, --check-device.
The --no-check-device option disables comparing
device numbers during preparatory stage of an incremental dump.
This allows to avoid creating full dumps if the device numbers
change (e.g. when using an LVM snapshot).
The --check-device option enables comparing device
numbers. This is the default. This option is provided to undo the
effect of the previous --no-check-device option, e.g.
if it was set in TAR_OPTIONS environment variable.
- The
--transform option.
Any number of --transform options can be given in the
command line. The specified transformations will be applied in turn.
Argument to --transform option can be a list of replace
expressions, separated by a semicolon (as in sed).
Filename transformations are applied to symbolic link targets
during both creation and extraction. Tar 1.19 used them only
during extraction.
For a detailed description, see section
6.7
"Modifying File and Member Names".
- Info (end-of-volume) scripts
The value of the blocking factor is made available to info and
checkpoint scripts via environment variable TAR_BLOCKING_FACTOR.
- Incremental archives
Improved (sped up) extracting from incremental archives.
- Bugfixes.
- Fix bug introduced in version 1.19: tar refused to update
non-existing archives.
|
| 2007-10-10 |
1.19 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
- New option
--exclude-vcs excludes directories and
files, created by several widely used version control systems, e.g.
CVS/, .svn/, etc.
- The
--exclude-tag* and --exclude-cache*
option families work with incremental archives as well.
- Fixed handling of renamed files in listed incremental archives.
Previous versions always stored absolute file names in rename
records, even if -P was not used. This is fixed:
rename records contain file names processed in accordance with
the command line settings.
- Fixed
--version output.
- Recognition of broken archives.
When supplied an archive smaller than 512 bytes in reading mode
(-x, -t), previous tar versions silently
ignored it, exiting with code 0. It is fixed. Tar now issues the
following diagnostic message: This does not look like a tar
archive, and exits with code 2.
- Fix double-dot recognition in archive member names in case of duplicate
/..
- Fix file padding in case of truncation of the input file to zero size.
|
| 2007-06-29 |
1.18 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
- Licensed under the GPLv3.
- Several bugs in the testsuite are fixed.
|
| 2007-06-08 |
1.17 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
|
| 2006-12-09 |
1.16.1 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
- New option
--exclude-tag allows to specify exclusion
tag files, i.e. files whose presence in a directory means that
the directory should not be archived.
- The
--exclude-cache option excludes directories that
contain the CACHEDIR.TAG file from being archived. Previous
versions excluded directory contents only, while the directories
themselves were still added to the archive.
- Support for reading ustar type N header logical records
has been removed. This GNU extension was generated only by very old
versions of GNU tar. Unfortunately its implementation had
security holes. We don't expect that any tar archives in
practical use have type N records, but if you have one
and you trust its contents, you can decode it with GNU tar 1.16 or
earlier.
- Race conditions have been fixed that in some cases briefly allowed
files extracted by
tar -x --same-owner (or plain
tar -x, when running as root) to be accessed by users
that they shouldn't have been.
|
| 2006-10-21 |
1.16 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
Gzipped cpio archive and its signature.
|
See NEWS file for the list of changes.
A cpio archive is provided for those who do not have tar or sharutils. To unpack it run:
gzip -d -c tar-1.16.cpio.gz | cpio -i.
|
| 2006-06-16 |
1.15.91 |
Gzipped shell archive and its signature
Gzipped tar archive and its signature
Bzipped tar achive and its signature. |
See announce.
|
| 2006-02-19 |
1.15.90 |
Gzipped shell archive and its signature
Gzipped tar archive and its signature
Bzipped tar achive and its signature. |
Alpha release in preparation for next stable version. See its announce,
for the detailed description of bug fixes and new features.
|
| 2004-12-21 |
1.15.1 |
Gzipped patch over the previous version and its signature.
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
|
Unpacking archives piped from standard input now works correctly.
This logic flaw was introduced in version 1.15 and has unfortunately
passed unnoticed the pretesting phase.
If you have already downloaded version 1.15 of the package, you
may wish downloading the patch, instead of getting the complete new tarball.
To apply the patch, change to the tar-1.15 directory and
then use patch -p1. -p1 avoids guesswork in choosing
which subdirectory to find each file in.
|
| 2004-12-20 |
1.15 |
Gzipped shell archive and its signature.
Gzipped tar archive and its signature.
Bzipped tar archive and its signature.
|
- Compressed archives are recognised automatically, it is no longer
necessary to specify
-Z, -z, or -j
options to read them. Thus, you can now run tar tf archive.tar.gz
and expect it to work!
- When restoring incremental dumps,
--one-file-system option
prevents directory hierarchies residing on different devices
from being purged.
--strip-path option renamed to --strip-components.
Restore script starts restoring only if it is given
--all (-a) option or some patterns. This prevents
accidental restores.
tar --verify prints a warning if during archive creation
some of the file names had their prefixes stripped off.
- New option
--exclude-caches instructs tar to exclude
cache directories.
See NEWS for more detailed information.
|
| 2004-09-02 |
1.14.90 |
Gzipped shell archive
Gzipped tar archive
Bzipped tar archive
|
An alpha release fixing bugs found in version 1.14. See the list of user-visible changes and ChangeLog diff for detailed information.
|
| 2004-05-10 |
1.14 |
Gzipped shell archive
Gzipped tar archive
Bzipped tar archive |
First major release since 1999. See NEWS, and ChangeLog for details. |
Return to GNU's home page.
Please send FSF & GNU inquiries & questions to
gnu@gnu.org.
There are also other ways to
contact the FSF.
Please send comments on these web pages to
webmasters@gnu.org,
send other questions to
gnu@gnu.org.
Copyright © 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
Updated:
$Date: 2009/03/05 08:14:05 $ $Author: gray $