Up: posix


8.3.6.1 Controlling Extended Header Keywords
--pax-option=keyword-list
Handle keywords in PAX extended headers. This option is equivalent to -o option of the pax utility.

Keyword-list is a comma-separated list of keyword options, each keyword option taking one of the following forms:

delete=pattern
When used with one of archive-creation commands, this option instructs tar to omit from extended header records that it produces any keywords matching the string pattern.

When used in extract or list mode, this option instructs tar to ignore any keywords matching the given pattern in the extended header records. In both cases, matching is performed using the pattern matching notation described in POSIX 1003.2, 3.13 (see wildcards). For example:

          --pax-option delete=security.*
     

would suppress security-related information.

exthdr.name=string
This keyword allows user control over the name that is written into the ustar header blocks for the extended headers. The name is obtained from string after making the following substitutions:

Meta-character Replaced By
%d The directory name of the file, equivalent to the result of the dirname utility on the translated pathname.
%f The filename of the file, equivalent to the result of the basename utility on the translated pathname.
%p The process ID of the tar process.
%% A ‘%’ character.

Any other ‘%’ characters in string produce undefined results.

If no option ‘exthdr.name=string’ is specified, tar will use the following default value:

          %d/PaxHeaders.%p/%f
     

globexthdr.name=string
This keyword allows user control over the name that is written into the ustar header blocks for global extended header records. The name is obtained from the contents of string, after making the following substitutions:

Meta-character Replaced By
%n An integer that represents the sequence number of the global extended header record in the archive, starting at 1.
%p The process ID of the tar process.
%% A ‘%’ character.

Any other ‘%’ characters in string produce undefined results.

If no option ‘globexthdr.name=string’ is specified, tar will use the following default value:

          $TMPDIR/GlobalHead.%p.%n
     

where ‘$TMPDIR’ represents the value of the TMPDIR environment variable. If TMPDIR is not set, tar uses ‘/tmp’.

keyword=value
When used with one of archive-creation commands, these keyword/value pairs will be included at the beginning of the archive in a global extended header record. When used with one of archive-reading commands, tar will behave as if it has encountered these keyword/value pairs at the beginning of the archive in a global extended header record.
keyword:=value
When used with one of archive-creation commands, these keyword/value pairs will be included as records at the beginning of an extended header for each file. This is effectively equivalent to keyword=value form except that it creates no global extended header records.

When used with one of archive-reading commands, tar will behave as if these keyword/value pairs were included as records at the end of each extended header; thus, they will override any global or file-specific extended header record keywords of the same names. For example, in the command:

          tar --format=posix --create \
              --file archive --pax-option gname:=user .
     

the group name will be forced to a new value for all files stored in the archive.