[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If a member is split between several volumes of an old GNU format archive
most third party tar
implementation will fail to extract
it. To extract it, use tarcat
program (see section Concatenate Volumes into a Single Archive).
This program is available from
GNU tar
home page. It concatenates several archive volumes into a single
valid archive. For example, if you have three volumes named from
‘vol-1.tar’ to ‘vol-3.tar’, you can do the following to
extract them using a third-party tar
:
$ tarcat vol-1.tar vol-2.tar vol-3.tar | tar xf -
You could use this approach for most (although not all) PAX
format archives as well. However, extracting split members from a PAX
archive is a much easier task, because PAX volumes are constructed in
such a way that each part of a split member is extracted to a
different file by tar
implementations that are not aware of
GNU extensions. More specifically, the very first part retains its
original name, and all subsequent parts are named using the pattern:
%d/GNUFileParts/%f.%n
where symbols preceded by ‘%’ are macro characters that have the following meaning:
Meta-character | Replaced By |
---|---|
%d | The directory name of the file, equivalent to the
result of the dirname utility on its full name. |
%f | The file name of the file, equivalent to the result
of the basename utility on its full name. |
%p | The process ID of the tar process that
created the archive. |
%n | Ordinal number of this particular part. |
For example, if the file ‘var/longfile’ was split during archive creation between three volumes, then the member names will be:
var/longfile var/GNUFileParts/longfile.1 var/GNUFileParts/longfile.2
When you extract your archive using a third-party tar
, these
files will be created on your disk, and the only thing you will need
to do to restore your file in its original form is concatenate them in
the proper order, for example:
$ cd var $ cat GNUFileParts/longfile.1 \ GNUFileParts/longfile.2 >> longfile $ rm -f GNUFileParts
Notice, that if the tar
implementation you use supports PAX
format archives, it will probably emit warnings about unknown keywords
during extraction. They will look like this:
Tar file too small Unknown extended header keyword 'GNU.volume.filename' ignored. Unknown extended header keyword 'GNU.volume.size' ignored. Unknown extended header keyword 'GNU.volume.offset' ignored.
You can safely ignore these warnings.
If your tar
implementation is not PAX-aware, you will get
more warnings and more files generated on your disk, e.g.:
$ tar xf vol-1.tar var/PaxHeaders/longfile: Unknown file type 'x', extracted as normal file Unexpected EOF in archive $ tar xf vol-2.tar tmp/GlobalHead.1: Unknown file type 'g', extracted as normal file GNUFileParts/PaxHeaders/sparsefile.1: Unknown file type 'x', extracted as normal file
Ignore these warnings. The ‘PaxHeaders.*’ directories created will contain files with extended header keywords describing the extracted files. You can delete them, unless they describe sparse members. Read further to learn more about them.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on August 23, 2023 using texi2html 5.0.