tar: Formats
1
1 8 Controlling the Archive Format
1 ********************************
1
1 Due to historical reasons, there are several formats of tar archives.
1 All of them are based on the same principles, but have some subtle
1 differences that often make them incompatible with each other.
1
1 GNU tar is able to create and handle archives in a variety of
1 formats. The most frequently used formats are (in alphabetical order):
1
1 gnu
1 Format used by GNU 'tar' versions up to 1.13.25. This format
1 derived from an early POSIX standard, adding some improvements such
1 as sparse file handling and incremental archives. Unfortunately
1 these features were implemented in a way incompatible with other
1 archive formats.
1
1 Archives in 'gnu' format are able to hold file names of unlimited
1 length.
1
1 oldgnu
1 Format used by GNU 'tar' of versions prior to 1.12.
1
1 v7
1 Archive format, compatible with the V7 implementation of tar. This
1 format imposes a number of limitations. The most important of them
1 are:
1
1 1. The maximum length of a file name is limited to 99 characters.
1 2. The maximum length of a symbolic link is limited to 99
1 characters.
1 3. It is impossible to store special files (block and character
1 devices, fifos etc.)
1 4. Maximum value of user or group ID is limited to 2097151
1 (7777777 octal)
1 5. V7 archives do not contain symbolic ownership information
1 (user and group name of the file owner).
1
1 This format has traditionally been used by Automake when producing
1 Makefiles. This practice will change in the future, in the
1 meantime, however this means that projects containing file names
1 more than 99 characters long will not be able to use GNU 'tar' 1.30
1 and Automake prior to 1.9.
1
1 ustar
1 Archive format defined by POSIX.1-1988 specification. It stores
1 symbolic ownership information. It is also able to store special
1 files. However, it imposes several restrictions as well:
1
1 1. The maximum length of a file name is limited to 256
1 characters, provided that the file name can be split at a
1 directory separator in two parts, first of them being at most
1 155 bytes long. So, in most cases the maximum file name
1 length will be shorter than 256 characters.
1 2. The maximum length of a symbolic link name is limited to 100
1 characters.
1 3. Maximum size of a file the archive is able to accommodate is
1 8GB
1 4. Maximum value of UID/GID is 2097151.
1 5. Maximum number of bits in device major and minor numbers is
1 21.
1
1 star
1 Format used by Jo"rg Schilling 'star' implementation. GNU 'tar' is
1 able to read 'star' archives but currently does not produce them.
1
1 posix
1 Archive format defined by POSIX.1-2001 specification. This is the
1 most flexible and feature-rich format. It does not impose any
1 restrictions on file sizes or file name lengths. This format is
1 quite recent, so not all tar implementations are able to handle it
1 properly. However, this format is designed in such a way that any
1 tar implementation able to read 'ustar' archives will be able to
1 read most 'posix' archives as well, with the only exception that
1 any additional information (such as long file names etc.) will in
1 such case be extracted as plain text files along with the files it
1 refers to.
1
1 This archive format will be the default format for future versions
1 of GNU 'tar'.
1
1 The following table summarizes the limitations of each of these
1 formats:
1
1 Format UID File Size File Name Devn
1 --------------------------------------------------------------------
1 gnu 1.8e19 Unlimited Unlimited 63
1 oldgnu 1.8e19 Unlimited Unlimited 63
1 v7 2097151 8GB 99 n/a
1 ustar 2097151 8GB 256 21
1 posix Unlimited Unlimited Unlimited Unlimited
1
1 The default format for GNU 'tar' is defined at compilation time. You
1 may check it by running 'tar --help', and examining the last lines of
1 its output. Usually, GNU 'tar' is configured to create archives in
1 'gnu' format, however, future version will switch to 'posix'.
1
Menu