isposix

Un outil pour savoir si une commande est posix - retour accueil

git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |

pax.html (166765B)


      1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved -->
      2 <!DOCTYPE HTML>
      3 <html lang="en">
      4 <head>
      5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0">
      6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 -->
      8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved -->
      9 <title>pax</title>
     10 </head>
     11 <body bgcolor="white">
     12 <div class="NAVHEADER">
     13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
     14 <tr class="nav">
     15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/pathchk.html" accesskey="P">&lt;&lt;&lt;
     16 Previous</a></td>
     17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
     18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/pr.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
     19 </tr>
     20 </table>
     21 <hr align="left" width="100%"></div>
     22 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3">
     23 <center><font size="2">The Open Group Base Specifications Issue 8<br>
     24 IEEE Std 1003.1-2024<br>
     25 Copyright © 2001-2024 The IEEE and The Open Group</font></center>
     26 <hr size="2" noshade>
     27 <a name="top" id="top"></a> <a name="pax" id="pax"></a> <a name="tag_20_94" id="tag_20_94"></a><!-- pax -->
     28 <h4 class="mansect"><a name="tag_20_94_01" id="tag_20_94_01"></a>NAME</h4>
     29 <blockquote>pax — portable archive interchange</blockquote>
     30 <h4 class="mansect"><a name="tag_20_94_02" id="tag_20_94_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <p><code><tt>pax</tt> <b>[</b><tt>-dv</tt><b>] [</b><tt>-c|-n</tt><b>] [</b><tt>-H|-L</tt><b>] [</b><tt>-o</tt> <i>options</i><b>]
     33 [</b><tt>-f</tt> <i>archive</i><b>] [</b><tt>-s</tt> <i>replstr</i><b>]</b><tt>...<br>
     34 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> <b>[</b><i>pattern</i><tt>...</tt><b>]</b> <tt><br>
     35 <br>
     36 pax -r</tt><b>[</b><tt>-c|-n</tt><b>] [</b><tt>-dikuv</tt><b>] [</b><tt>-H|-L</tt><b>] [</b><tt>-f</tt> <i>archive</i><b>]
     37 [</b><tt>-o</tt> <i>options</i><b>]</b><tt>...</tt> <b>[</b><tt>-p</tt> <i>string</i><b>]</b><tt>...<br>
     38 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> <b>[</b><tt>-s</tt> <i>replstr</i><b>]</b><tt>...</tt>
     39 <b>[</b><i>pattern</i><tt>...</tt><b>]</b> <tt><br>
     40 <br>
     41 pax -w</tt> <b>[</b><tt>-dituvX</tt><b>] [</b><tt>-H|-L</tt><b>] [</b><tt>-b</tt> <i>blocksize</i><b>] [[</b><tt>-a</tt><b>]
     42 [</b><tt>-f</tt> <i>archive</i><b>]] [</b><tt>-o</tt> <i>options</i><b>]</b><tt>...<br>
     43 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> <b>[</b><tt>-s</tt> <i>replstr</i><b>]</b><tt>...</tt> <b>[</b><tt>-x</tt>
     44 <i>format</i><b>] [</b><i>file</i><tt>...</tt><b>]</b> <tt><br>
     45 <br>
     46 pax -r -w</tt> <b>[</b><tt>-dikltuvX</tt><b>] [</b><tt>-H|-L</tt><b>] [</b><tt>-o</tt> <i>options</i><b>]</b><tt>...</tt>
     47 <b>[</b><tt>-p</tt> <i>string</i><b>]</b><tt>...<br>
     48 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> <b>[</b><tt>-s</tt> <i>replstr</i><b>]</b><tt>...</tt>
     49 <b>[</b><i>file</i><tt>...</tt><b>]</b> <i>directory</i> <tt><br></tt></code></p>
     50 </blockquote>
     51 <h4 class="mansect"><a name="tag_20_94_03" id="tag_20_94_03"></a>DESCRIPTION</h4>
     52 <blockquote>
     53 <p>The <i>pax</i> utility shall read, write, and write lists of the members of archive files and copy directory hierarchies. A
     54 variety of archive formats shall be supported; see the <b>-x</b> <i>format</i> option.</p>
     55 <p>The action to be taken depends on the presence of the <b>-r</b> and <b>-w</b> options. The four combinations of <b>-r</b> and
     56 <b>-w</b> are referred to as the four modes of operation: <b>list</b>, <b>read</b>, <b>write</b>, and <b>copy</b> modes,
     57 corresponding respectively to the four forms shown in the SYNOPSIS section.</p>
     58 <dl compact>
     59 <dd></dd>
     60 <dt><b>list</b></dt>
     61 <dd>In <b>list</b> mode (when neither <b>-r</b> nor <b>-w</b> are specified), <i>pax</i> shall write the names of the members of
     62 the archive file read from the standard input, with pathnames matching the specified patterns, to standard output. If a named file
     63 is of type directory, the file hierarchy rooted at that file shall be listed as well.</dd>
     64 <dt><b>read</b></dt>
     65 <dd>In <b>read</b> mode (when <b>-r</b> is specified, but <b>-w</b> is not), <i>pax</i> shall extract the members of the archive
     66 file read from the standard input, with pathnames matching the specified patterns. If an extracted file is of type directory, the
     67 file hierarchy rooted at that file shall be extracted as well. The extracted files shall be created performing pathname resolution
     68 with the directory in which <i>pax</i> was invoked as the current working directory.
     69 <p>If an attempt is made to extract a directory when the directory already exists, this shall not be considered an error. If an
     70 attempt is made to extract a FIFO when the FIFO already exists, this shall not be considered an error.</p>
     71 <p>The ownership, access, and modification times, and file mode of the restored files are discussed under the <b>-p</b> option.</p>
     72 </dd>
     73 <dt><b>write</b></dt>
     74 <dd>In <b>write</b> mode (when <b>-w</b> is specified, but <b>-r</b> is not), <i>pax</i> shall write the contents of the
     75 <i>file</i> operands to the standard output in an archive format. If no <i>file</i> operands are specified, a list of files to
     76 copy, one per line, shall be read from the standard input and each entry in this list shall be processed as if it had been a
     77 <i>file</i> operand on the command line. A file of type directory shall include all of the files in the file hierarchy rooted at
     78 the file.</dd>
     79 <dt><b>copy</b></dt>
     80 <dd>In <b>copy</b> mode (when both <b>-r</b> and <b>-w</b> are specified), <i>pax</i> shall copy the <i>file</i> operands to the
     81 destination directory.
     82 <p>If no <i>file</i> operands are specified, a list of files to copy, one per line, shall be read from the standard input. A file
     83 of type directory shall include all of the files in the file hierarchy rooted at the file.</p>
     84 <p>The effect of the <b>copy</b> shall be as if the copied files were written to a <i>pax</i> format archive file and then
     85 subsequently extracted, except that copying of sockets may be supported even if archiving them in write mode is not supported, and
     86 that there may be hard links between the original and the copied files. If the destination directory is a subdirectory of one of
     87 the files to be copied, the results are unspecified. If the destination directory is a file of a type not defined by the System
     88 Interfaces volume of POSIX.1-2024, the results are implementation-defined; otherwise, it shall be an error for the file named by
     89 the <i>directory</i> operand not to exist, not be writable by the user, or not be a file of type directory.</p>
     90 </dd>
     91 </dl>
     92 <p>In <b>read</b> or <b>copy</b> modes, if intermediate directories are necessary to extract an archive member, <i>pax</i> shall
     93 perform actions equivalent to the <a href="../functions/mkdir.html"><i>mkdir</i>()</a> function defined in the System Interfaces
     94 volume of POSIX.1-2024, called with the following arguments:</p>
     95 <ul>
     96 <li>
     97 <p>The intermediate directory used as the <i>path</i> argument</p>
     98 </li>
     99 <li>
    100 <p>The value of the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO as the <i>mode</i> argument</p>
    101 </li>
    102 </ul>
    103 <p>If any specified <i>pattern</i> or <i>file</i> operands are not matched by at least one file or archive member, <i>pax</i> shall
    104 write a diagnostic message to standard error for each one that did not match and exit with a non-zero exit status.</p>
    105 <p>The archive formats described in the EXTENDED DESCRIPTION section shall be automatically detected on input. The default output
    106 archive format shall be implementation-defined.</p>
    107 <p>A single archive can span multiple files. The <i>pax</i> utility shall determine, in an implementation-defined manner, what file
    108 to read or write as the next file.</p>
    109 <p>If the selected archive format supports the specification of linked files, it shall be an error if these files cannot be linked
    110 when the archive is extracted. For archive formats that do not store file contents with each name that causes a hard link, if the
    111 file that contains the data is not extracted during this <i>pax</i> session, either the data shall be restored from the original
    112 file, or a diagnostic message shall be displayed with the name of a file that can be used to extract the data. In traversing
    113 directories, <i>pax</i> shall detect infinite loops; that is, entering a previously visited directory that is an ancestor of the
    114 last file visited. When it detects an infinite loop, <i>pax</i> shall write a diagnostic message to standard error and shall
    115 terminate.</p>
    116 </blockquote>
    117 <h4 class="mansect"><a name="tag_20_94_04" id="tag_20_94_04"></a>OPTIONS</h4>
    118 <blockquote>
    119 <p>The <i>pax</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax
    120 Guidelines</i></a> , except that the order of presentation of the <b>-o</b>, <b>-p</b>, and <b>-s</b> options is significant.</p>
    121 <p>The following options shall be supported:</p>
    122 <dl compact>
    123 <dd></dd>
    124 <dt><b>-r</b></dt>
    125 <dd>Read an archive file from standard input.</dd>
    126 <dt><b>-w</b></dt>
    127 <dd>Write files to the standard output in the specified archive format.</dd>
    128 <dt><b>-a</b></dt>
    129 <dd>Append files to the end of the archive. It is implementation-defined which devices on the system support appending. Additional
    130 file formats unspecified by this volume of POSIX.1-2024 may impose restrictions on appending.</dd>
    131 <dt><b>-b&nbsp;</b><i>blocksize</i></dt>
    132 <dd>Block the output at a positive decimal integer number of bytes per write to the archive file. Devices and archive formats may
    133 impose restrictions on blocking. Blocking shall be automatically determined on input. Conforming applications shall not specify a
    134 <i>blocksize</i> value larger than 32256. Default blocking when creating archives depends on the archive format. (See the <b>-x</b>
    135 option below.)</dd>
    136 <dt><b>-c</b></dt>
    137 <dd>Match all file or archive members except those specified by the <i>pattern</i> or <i>file</i> operands.</dd>
    138 <dt><b>-d</b></dt>
    139 <dd>Cause files of type directory being copied or archived or archive members of type directory being extracted or listed to match
    140 only the file or archive member itself and not the file hierarchy rooted at the file.</dd>
    141 <dt><b>-f&nbsp;</b><i>archive</i></dt>
    142 <dd>Specify the pathname of the input or output archive, overriding the default standard input (in <b>list</b> or <b>read</b>
    143 modes) or standard output (<b>write</b> mode).</dd>
    144 <dt><b>-H</b></dt>
    145 <dd>If a symbolic link referencing a file of type directory is specified on the command line, <i>pax</i> shall archive the file
    146 hierarchy rooted in the file referenced by the link, using the name of the link as the root of the file hierarchy. Otherwise, if a
    147 symbolic link referencing a file of any other file type which <i>pax</i> can normally archive is specified on the command line,
    148 then <i>pax</i> shall archive the file referenced by the link, using the name of the link. The default behavior, when neither
    149 <b>-H</b> or <b>-L</b> are specified, shall be to archive the symbolic link itself.</dd>
    150 <dt><b>-i</b></dt>
    151 <dd>Interactively rename files or archive members. For each archive member matching a <i>pattern</i> operand or file matching a
    152 <i>file</i> operand, a prompt shall be written to the file <b>/dev/tty</b>. The prompt shall contain the name of the file or
    153 archive member, but the format is otherwise unspecified. A line shall then be read from <b>/dev/tty</b>. If this line is blank, the
    154 file or archive member shall be skipped. If this line consists of a single period, the file or archive member shall be processed
    155 with no modification to its name. Otherwise, its name shall be replaced with the contents of the line. The <i>pax</i> utility shall
    156 immediately exit with a non-zero exit status if end-of-file is encountered when reading a response or if <b>/dev/tty</b> cannot be
    157 opened for reading and writing.
    158 <p>The results of extracting a hard link to a file that has been renamed during extraction are unspecified.</p>
    159 </dd>
    160 <dt><b>-k</b></dt>
    161 <dd>Prevent the overwriting of existing files.</dd>
    162 <dt><b>-l</b></dt>
    163 <dd>(The letter ell.) In <b>copy</b> mode, hard links shall be made between the source and destination file hierarchies whenever
    164 possible. If specified in conjunction with <b>-H</b> or <b>-L</b>, when a symbolic link is encountered, the hard link created in
    165 the destination file hierarchy shall be to the file referenced by the symbolic link. If specified when neither <b>-H</b> nor
    166 <b>-L</b> is specified, when a symbolic link is encountered, the implementation shall create a hard link to the symbolic link in
    167 the source file hierarchy or copy the symbolic link to the destination.</dd>
    168 <dt><b>-L</b></dt>
    169 <dd>If a symbolic link referencing a file of type directory is specified on the command line or encountered during the traversal of
    170 a file hierarchy, <i>pax</i> shall archive the file hierarchy rooted in the file referenced by the link, using the name of the link
    171 as the root of the file hierarchy. Otherwise, if a symbolic link referencing a file of any other file type which <i>pax</i> can
    172 normally archive is specified on the command line or encountered during the traversal of a file hierarchy, <i>pax</i> shall archive
    173 the file referenced by the link, using the name of the link. The default behavior, when neither <b>-H</b> or <b>-L</b> are
    174 specified, shall be to archive the symbolic link itself.</dd>
    175 <dt><b>-n</b></dt>
    176 <dd>Select the first archive member that matches each <i>pattern</i> operand. No more than one archive member shall be matched for
    177 each pattern (although members of type directory shall still match the file hierarchy rooted at that file).</dd>
    178 <dt><b>-o&nbsp;</b><i>options</i></dt>
    179 <dd>Provide information to the implementation to modify the algorithm for extracting or writing files. The value of <i>options</i>
    180 shall consist of one or more &lt;comma&gt;-separated keywords of the form:
    181 <pre>
    182 <i>keyword</i><b>[[</b><tt>:</tt><b>]</b><tt>=</tt><i>value</i><b>][</b><tt>,</tt><i>keyword</i><b>[[</b><tt>:</tt><b>]</b><tt>=</tt><i>value</i><b>]</b><tt>, ...</tt><b>]</b><tt>
    183 </tt></pre>
    184 <p>Some keywords apply only to certain file formats, as indicated with each description. Use of keywords that are inapplicable to
    185 the file format being processed produces undefined results.</p>
    186 <p>Keywords in the <i>options</i> argument shall be a string that would be a valid portable filename as described in XBD <a href=
    187 "../basedefs/V1_chap03.html#tag_03_265"><i>3.265 Portable Filename Character Set</i></a> . <basefont size="2"></p>
    188 <dl>
    189 <dt><b>Note:</b></dt>
    190 <dd>Keywords are not expected to be filenames, merely to follow the same character composition rules as portable filenames.</dd>
    191 </dl>
    192 <basefont size="3">
    193 <p>Keywords can be preceded with white space. The <i>value</i> field shall consist of zero or more characters; within <i>value</i>,
    194 the application shall precede any literal &lt;comma&gt; with a &lt;backslash&gt;, which shall be ignored, but preserves the
    195 &lt;comma&gt; as part of <i>value</i>. A &lt;comma&gt; as the final character, or a &lt;comma&gt; followed solely by white space as
    196 the final characters, in <i>options</i> shall be ignored. Multiple <b>-o</b> options can be specified; if keywords given to these
    197 multiple <b>-o</b> options conflict, the keywords and values appearing later in command line sequence shall take precedence and the
    198 earlier shall be silently ignored. The following keyword values of <i>options</i> shall be supported for the file formats as
    199 indicated:</p>
    200 <dl compact>
    201 <dd></dd>
    202 <dt><b>delete</b>=<i>pattern</i></dt>
    203 <dd><br>
    204 (Applicable only to the <b>-x</b> <b>pax</b> format.) When used in <b>write</b> or <b>copy</b> mode, <i>pax</i> shall omit from
    205 extended header records that it produces any keywords matching the string pattern. When used in <b>read</b> or <b>list</b> mode,
    206 <i>pax</i> shall ignore any keywords matching the string pattern in the extended header records. In both cases, matching shall be
    207 performed using the pattern matching notation described in <a href="../utilities/V3_chap02.html#tag_19_14_01"><i>2.14.1 Patterns
    208 Matching a Single Character</i></a> and <a href="../utilities/V3_chap02.html#tag_19_14_02"><i>2.14.2 Patterns Matching Multiple
    209 Characters</i></a> . For example:
    210 <pre>
    211 <tt>-o </tt><b>delete</b><tt>=</tt><i>security</i><tt>.*
    212 </tt></pre>
    213 <p>would suppress security-related information. See <a href="#tag_20_94_13_03">pax Extended Header</a> for extended header record
    214 keyword usage.</p>
    215 <p>When multiple <b>-o</b><b>delete=pattern</b> options are specified, the patterns shall be additive; all keywords matching the
    216 specified string patterns shall be omitted from extended header records that <i>pax</i> produces.</p>
    217 </dd>
    218 <dt><b>exthdr.name</b>=<i>string</i></dt>
    219 <dd><br>
    220 (Applicable only to the <b>-x</b> <b>pax</b> format.) This keyword allows user control over the name that is written into the
    221 <b>ustar</b> header blocks for the extended header produced under the circumstances described in <a href="#tag_20_94_13_02">pax
    222 Header Block</a> . The name shall be the contents of <i>string</i>, after the following character substitutions have been made:
    223 <center>
    224 <table border="1" cellpadding="3" align="center">
    225 <tr valign="top">
    226 <th align="center">
    227 <p class="tent"><b><i>string</i> Includes:</b></p>
    228 </th>
    229 <th align="center">
    230 <p class="tent"><b>Replaced by:</b></p>
    231 </th>
    232 </tr>
    233 <tr valign="top">
    234 <td align="left">
    235 <p class="tent">%d</p>
    236 </td>
    237 <td align="left">
    238 <p class="tent">The directory name of the file, equivalent to the result of the <a href=
    239 "../utilities/dirname.html"><i>dirname</i></a> utility on the translated pathname.</p>
    240 </td>
    241 </tr>
    242 <tr valign="top">
    243 <td align="left">
    244 <p class="tent">%f</p>
    245 </td>
    246 <td align="left">
    247 <p class="tent">The filename of the file, equivalent to the result of the <a href="../utilities/basename.html"><i>basename</i></a>
    248 utility on the translated pathname.</p>
    249 </td>
    250 </tr>
    251 <tr valign="top">
    252 <td align="left">
    253 <p class="tent">%p</p>
    254 </td>
    255 <td align="left">
    256 <p class="tent">The process ID of the <i>pax</i> process.</p>
    257 </td>
    258 </tr>
    259 <tr valign="top">
    260 <td align="left">
    261 <p class="tent">%%</p>
    262 </td>
    263 <td align="left">
    264 <p class="tent">A <tt>'%'</tt> character.</p>
    265 </td>
    266 </tr>
    267 </table>
    268 </center>
    269 <p class="tent">Any other <tt>'%'</tt> characters in <i>string</i> produce undefined results.</p>
    270 <p class="tent">If no <b>-o</b> <b>exthdr.name=string</b> is specified, <i>pax</i> shall use the following default value:</p>
    271 <pre>
    272 <tt>%d/PaxHeaders.%p/%f
    273 </tt></pre></dd>
    274 <dt><b>globexthdr.name</b>=<i>string</i></dt>
    275 <dd><br>
    276 (Applicable only to the <b>-x</b> <b>pax</b> format.) When used in <b>write</b> or <b>copy</b> mode with the appropriate options,
    277 <i>pax</i> shall create global extended header records with <b>ustar</b> header blocks that are treated as regular files by
    278 previous versions of <i>pax</i>. This keyword allows user control over the name that is written into the <b>ustar</b> header blocks
    279 for global extended header records. The name shall be the contents of string, after the following character substitutions have been
    280 made:
    281 <center>
    282 <table border="1" cellpadding="3" align="center">
    283 <tr valign="top">
    284 <th align="center">
    285 <p class="tent"><b><i>string</i> Includes:</b></p>
    286 </th>
    287 <th align="center">
    288 <p class="tent"><b>Replaced by:</b></p>
    289 </th>
    290 </tr>
    291 <tr valign="top">
    292 <td align="left">
    293 <p class="tent">%n</p>
    294 </td>
    295 <td align="left">
    296 <p class="tent">An integer that represents the sequence number of the global extended header record in the archive, starting at
    297 1.</p>
    298 </td>
    299 </tr>
    300 <tr valign="top">
    301 <td align="left">
    302 <p class="tent">%p</p>
    303 </td>
    304 <td align="left">
    305 <p class="tent">The process ID of the <i>pax</i> process.</p>
    306 </td>
    307 </tr>
    308 <tr valign="top">
    309 <td align="left">
    310 <p class="tent">%%</p>
    311 </td>
    312 <td align="left">
    313 <p class="tent">A <tt>'%'</tt> character.</p>
    314 </td>
    315 </tr>
    316 </table>
    317 </center>
    318 <p class="tent">Any other <tt>'%'</tt> characters in <i>string</i> produce undefined results.</p>
    319 <p class="tent">If no <b>-o</b> <b>globexthdr.name=string</b> is specified, <i>pax</i> shall use the following default value:</p>
    320 <pre>
    321 <tt>$TMPDIR/GlobalHead.%p.%n
    322 </tt></pre>
    323 <p class="tent">where $<i>TMPDIR</i> represents the value of the <i>TMPDIR</i> environment variable. If <i>TMPDIR</i> is not set,
    324 <i>pax</i> shall use <b>/tmp</b>.</p>
    325 </dd>
    326 <dt><b>invalid</b>=<i>action</i></dt>
    327 <dd><br>
    328 (Applicable only to the <b>-x</b> <b>pax</b> format.) This keyword allows user control over the action <i>pax</i> takes upon
    329 encountering values in an extended header record that, in <b>read</b> or <b>copy</b> mode, are invalid in the destination hierarchy
    330 or, in <b>list</b> mode, cannot be written in the codeset and current locale of the implementation. The following are invalid
    331 values that shall be recognized by <i>pax</i>:
    332 <ul>
    333 <li class="tent">In <b>read</b> or <b>copy</b> mode, a filename or link name that contains character encodings invalid in the
    334 destination hierarchy. (For example, the name may contain embedded NULs.)</li>
    335 <li class="tent">In <b>read</b> or <b>copy</b> mode, a filename or link name that is longer than the maximum allowed in the
    336 destination hierarchy (for either a pathname component or the entire pathname).</li>
    337 <li class="tent">In <b>list</b> mode, any character string value (filename, link name, user name, and so on) that cannot be written
    338 in the codeset and current locale of the implementation.</li>
    339 </ul>
    340 <p class="tent">The following mutually-exclusive values of the <i>action</i> argument are supported:</p>
    341 <dl compact>
    342 <dd></dd>
    343 <dt><b>binary</b></dt>
    344 <dd>In <b>write</b> mode, <i>pax</i> shall generate a <b>hdrcharset</b>=<b>BINARY</b> extended header record for each file with a
    345 filename, link name, group name, owner name, or any other field in an extended header record that cannot be translated to the UTF-8
    346 codeset, allowing the archive to contain the files with unencoded extended header record values. In <b>read</b> or <b>copy</b>
    347 mode, <i>pax</i> shall use the values specified in the header without translation, regardless of whether this may overwrite an
    348 existing file with a valid name. In <b>list</b> mode, <i>pax</i> shall behave identically to the <b>bypass</b> action.</dd>
    349 <dt><b>bypass</b></dt>
    350 <dd>In <b>read</b> or <b>copy</b> mode, <i>pax</i> shall bypass the file, causing no change to the destination hierarchy. In
    351 <b>list</b> mode, <i>pax</i> shall write all requested valid values for the file, but its method for writing invalid values is
    352 unspecified.</dd>
    353 <dt><b>rename</b></dt>
    354 <dd>In <b>read</b> or <b>copy</b> mode, <i>pax</i> shall act as if the <b>-i</b> option were in effect for each file with invalid
    355 filename or link name values, allowing the user to provide a replacement name interactively. In <b>list</b> mode, <i>pax</i> shall
    356 behave identically to the <b>bypass</b> action.</dd>
    357 <dt><b>UTF-8</b></dt>
    358 <dd>When used in <b>read</b>, <b>copy</b>, or <b>list</b> mode and a filename, link name, owner name, or any other field in an
    359 extended header record cannot be translated from the <b>pax</b> UTF-8 codeset format to the codeset and current locale of the
    360 implementation, <i>pax</i> shall use the actual UTF-8 encoding for the name. If a <b>hdrcharset</b> extended header record is in
    361 effect for this file, the character set specified by that record shall be used instead of UTF-8. If a
    362 <b>hdrcharset</b>=<b>BINARY</b> extended header record is in effect for this file, no translation shall be performed.</dd>
    363 <dt><b>write</b></dt>
    364 <dd>In <b>read</b> or <b>copy</b> mode, <i>pax</i> shall write the file, translating the name, regardless of whether this may
    365 overwrite an existing file with a valid name. In <b>list</b> mode, <i>pax</i> shall behave identically to the <b>bypass</b>
    366 action.</dd>
    367 </dl>
    368 <p class="tent">If no <b>-o</b> <b>invalid=option</b> is specified, <i>pax</i> shall act as if <b>-o</b><b>invalid=bypass</b> were
    369 specified. Any overwriting of existing files that may be allowed by the <b>-o</b><b>invalid=</b> actions shall be subject to
    370 permission (<b>-p</b>) and modification time (<b>-u</b>) restrictions, and shall be suppressed if the <b>-k</b> option is also
    371 specified.</p>
    372 </dd>
    373 <dt><b>linkdata</b></dt>
    374 <dd><br>
    375 (Applicable only to the <b>-x</b> <b>pax</b> format.) In <b>write</b> mode, <i>pax</i> shall write the contents of a file to the
    376 archive even when that file is merely a hard link to a file whose contents have already been written to the archive.</dd>
    377 <dt><b>listopt</b>=<i>format</i></dt>
    378 <dd><br>
    379 This keyword specifies the output format of the table of contents produced when the <b>-v</b> option is specified in <b>list</b>
    380 mode. See <a href="#tag_20_94_04_01">List Mode Format Specifications</a> . To avoid ambiguity, the <b>listopt=format</b> shall be
    381 the only or final <b>keyword=value</b> pair in a <b>-o</b> option-argument; all characters in the remainder of the option-argument
    382 shall be considered part of the format string. When multiple <b>-o</b><b>listopt=format</b> options are specified, the format
    383 strings shall be considered a single, concatenated string, evaluated in command line order.</dd>
    384 <dt><b>times</b></dt>
    385 <dd><br>
    386 (Applicable only to the <b>-x</b> <i>pax</i> format.) When used in <b>write</b> or <b>copy</b> mode, <i>pax</i> shall include
    387 <b>atime</b> and <b>mtime</b> extended header records for each file. See <a href="#tag_20_94_13_05">pax Extended Header File
    388 Times</a> .</dd>
    389 </dl>
    390 <p class="tent">In addition to these keywords, if the <b>-x</b> <i>pax</i> format is specified, any of the keywords and values
    391 defined in <a href="#tag_20_94_13_03">pax Extended Header</a> , including implementation extensions, can be used in <b>-o</b>
    392 option-arguments, in either of two modes:</p>
    393 <dl compact>
    394 <dd></dd>
    395 <dt><b>keyword</b>=<i>value</i></dt>
    396 <dd><br>
    397 When used in <b>write</b> or <b>copy</b> mode, these keyword/value pairs shall be included at the beginning of the archive as
    398 <b>typeflag</b> <b>g</b> global extended header records. When used in <b>read</b> or <b>list</b> mode, these keyword/value pairs
    399 shall act as if they had been at the beginning of the archive as <b>typeflag</b> <b>g</b> global extended header records.</dd>
    400 <dt><b>keyword</b>:=<i>value</i></dt>
    401 <dd><br>
    402 When used in <b>write</b> or <b>copy</b> mode, these keyword/value pairs shall be included as records at the beginning of a
    403 <b>typeflag</b> <b>x</b> extended header for each file. (This shall be equivalent to the &lt;equals-sign&gt; form except that it
    404 creates no <b>typeflag</b> <b>g</b> global extended header records.) When used in <b>read</b> or <b>list</b> mode, these
    405 keyword/value pairs shall act as if they were included as records at the end of each extended header; thus, they shall override any
    406 global or file-specific extended header record keywords of the same names. For example, in the command:
    407 <pre>
    408 <tt>pax -r -o "
    409 gname:=mygroup,
    410 " &lt;archive
    411 </tt></pre>
    412 <p class="tent">the group name is forced to a new value for all files read from the archive.</p>
    413 </dd>
    414 </dl>
    415 <p class="tent">The precedence of <b>-o</b> keywords over various fields in the archive is described in <a href=
    416 "#tag_20_94_13_04">pax Extended Header Keyword Precedence</a> . If the <b>-o</b> <b>delete</b>=<i>pattern</i>, <b>-o</b>
    417 <b>keyword</b>=<i>value</i>, or <b>-o</b> <b>keyword</b>:=<i>value</i> options are used to override or remove any extended header
    418 data needed to find files in an archive (e.g., <tt>-o delete=size</tt> for a file whose size cannot be represented in a
    419 <b>ustar</b> header or <tt>-o size=100</tt> for a file whose size is not 100 bytes), the behavior is undefined.</p>
    420 </dd>
    421 <dt><b>-p&nbsp;</b><i>string</i></dt>
    422 <dd>Specify one or more file characteristic options (privileges). The <i>string</i> option-argument shall be a string specifying
    423 file characteristics to be retained or discarded on extraction. The string shall consist of the specification characters
    424 <tt>a</tt>, <tt>e</tt>, <tt>m</tt>, <tt>o</tt>, and <tt>p</tt>. Other implementation-defined characters can be included. Multiple
    425 characteristics can be concatenated within the same string and multiple <b>-p</b> options can be specified. The meaning of the
    426 specification characters are as follows:
    427 <dl compact>
    428 <dd></dd>
    429 <dt><tt>a</tt></dt>
    430 <dd>Do not preserve file access times.</dd>
    431 <dt><tt>e</tt></dt>
    432 <dd>Preserve the user ID, group ID, file mode bits (see XBD <a href="../basedefs/V1_chap03.html#tag_03_145"><i>3.145 File Mode
    433 Bits</i></a> ), access time, modification time, and any other implementation-defined file characteristics.</dd>
    434 <dt><tt>m</tt></dt>
    435 <dd>Do not preserve file modification times.</dd>
    436 <dt><tt>o</tt></dt>
    437 <dd>Preserve the user ID and group ID.</dd>
    438 <dt><tt>p</tt></dt>
    439 <dd>Preserve the file mode bits. Other implementation-defined file mode attributes may be preserved.</dd>
    440 </dl>
    441 <p class="tent">In the preceding list, &quot;preserve&quot; indicates that an attribute stored in the archive shall be given to the
    442 extracted file, subject to the permissions of the invoking process. The access and modification times of the file shall be
    443 preserved unless otherwise specified with the <b>-p</b> option or not stored in the archive. All attributes that are not preserved
    444 shall be determined as part of the normal file creation action (see <a href=
    445 "../utilities/V3_chap01.html#tag_18_01_01_04"><i>1.1.1.4 File Read, Write, and Creation</i></a> ).</p>
    446 <p class="tent">If neither the <tt>e</tt> nor the <tt>o</tt> specification character is specified, or the user ID and group ID are
    447 not preserved for any reason, <i>pax</i> shall not set the S_ISUID and S_ISGID bits of the file mode.</p>
    448 <p class="tent">If the preservation of any of these items fails for any reason, <i>pax</i> shall write a diagnostic message to
    449 standard error. Failure to preserve these items shall affect the final exit status, but shall not cause the extracted file to be
    450 deleted.</p>
    451 <p class="tent">If file characteristic letters in any of the <i>string</i> option-arguments are duplicated or conflict with each
    452 other, the ones given last shall take precedence. For example, if <b>-p</b> <tt>eme</tt> is specified, file modification times are
    453 preserved.</p>
    454 </dd>
    455 <dt><b>-s&nbsp;</b><i>replstr</i></dt>
    456 <dd>Modify file or archive member names named by <i>pattern</i> or <i>file</i> operands according to the substitution expression
    457 <i>replstr</i>, using the syntax of the <a href="../utilities/ed.html"><i>ed</i></a> utility. The concepts of &quot;address&quot; and
    458 &quot;line&quot; are meaningless in the context of the <i>pax</i> utility, and shall not be supplied. The format shall be:
    459 <pre>
    460 <tt>-s /</tt><i>old</i><tt>/</tt><i>new</i><tt>/</tt><b>[</b><tt>gpsS</tt><b>]</b><tt>
    461 </tt></pre>
    462 <p class="tent">where as in <a href="../utilities/ed.html"><i>ed</i></a>, <i>old</i> is a basic regular expression and <i>new</i>
    463 can contain an &lt;ampersand&gt;, <tt>'\n'</tt> (where <i>n</i> is a digit) back-references, or subexpression matching. The
    464 <i>old</i> string shall also be permitted to contain &lt;newline&gt; characters.</p>
    465 <p class="tent">Any non-null character can be used as a delimiter (<tt>'/'</tt> shown here). Multiple <b>-s</b> expressions can be
    466 specified; the expressions shall be applied in the order specified, terminating with the first successful substitution. The
    467 optional trailing <tt>'g'</tt> is as defined in the <a href="../utilities/ed.html"><i>ed</i></a> utility. The optional trailing
    468 <tt>'p'</tt> shall cause successful substitutions to be written to standard error. The optional trailing <tt>'s'</tt> and
    469 <tt>'S'</tt> control whether the substitutions are applied to symbolic link contents: <tt>'s'</tt> shall cause them not to be
    470 applied; <tt>'S'</tt> shall cause them to be applied. If neither is present, it is unspecified which is the default. If both are
    471 present, the behavior is unspecified. File or archive member names that substitute to the empty string shall be ignored when
    472 reading and writing archives. Symbolic link contents that substitute to the empty string shall not be treated specially.</p>
    473 </dd>
    474 <dt><b>-t</b></dt>
    475 <dd>When reading files from the file system, and if the user has the permissions required by <a href=
    476 "../functions/futimens.html"><i>futimens</i>()</a> to do so, set the access time of each file read to the access time that it had
    477 before being read by <i>pax</i>.</dd>
    478 <dt><b>-u</b></dt>
    479 <dd>Ignore files that are older (having a less recent file modification time) than a pre-existing file or archive member with the
    480 same name. In <b>read</b> mode, an archive member with the same name as a file in the file system shall be extracted if the archive
    481 member is newer than the file. In <b>write</b> mode, an archive file member with the same name as a file in the file system shall
    482 be superseded if the file is newer than the archive member. If <b>-a</b> is also specified, this is accomplished by appending to
    483 the archive; otherwise, it is unspecified whether this is accomplished by actual replacement in the archive or by appending to the
    484 archive. In <b>copy</b> mode, the file in the destination hierarchy shall be replaced if the file in the source hierarchy is
    485 newer.</dd>
    486 <dt><b>-v</b></dt>
    487 <dd>In <b>list</b> mode, produce a verbose table of contents (see the STDOUT section). Otherwise, write archive member pathnames to
    488 standard error (see the STDERR section).</dd>
    489 <dt><b>-x&nbsp;</b><i>format</i></dt>
    490 <dd>Specify the output archive format. The <i>pax</i> utility shall support the following formats:
    491 <dl compact>
    492 <dd></dd>
    493 <dt><b>cpio</b></dt>
    494 <dd>The <b>cpio</b> interchange format; see the EXTENDED DESCRIPTION section. The default <i>blocksize</i> for this format for
    495 character special archive files shall be 5120. Implementations shall support all <i>blocksize</i> values less than or equal to
    496 32256 that are multiples of 512.</dd>
    497 <dt><b>pax</b></dt>
    498 <dd>The <b>pax</b> interchange format; see the EXTENDED DESCRIPTION section. The default <i>blocksize</i> for this format for
    499 character special archive files shall be 5120. Implementations shall support all <i>blocksize</i> values less than or equal to
    500 32256 that are multiples of 512.</dd>
    501 <dt><b>ustar</b></dt>
    502 <dd>The <b>tar</b> interchange format; see the EXTENDED DESCRIPTION section. The default <i>blocksize</i> for this format for
    503 character special archive files shall be 10240. Implementations shall support all <i>blocksize</i> values less than or equal to
    504 32256 that are multiples of 512.</dd>
    505 </dl>
    506 <p class="tent">Implementation-defined formats shall specify a default block size as well as any other block sizes supported for
    507 character special archive files.</p>
    508 <p class="tent">Any attempt to append to an archive file in a format different from the existing archive format shall cause
    509 <i>pax</i> to exit immediately with a non-zero exit status.</p>
    510 </dd>
    511 <dt><b>-X</b></dt>
    512 <dd>When traversing the file hierarchy specified by a pathname, <i>pax</i> shall not descend below directories that have a
    513 different device ID (<i>st_dev</i>; see XSH <a href="../functions/fstatat.html#"><i>fstatat</i></a> ) than the specified pathname;
    514 that is, when a directory with a different device ID is encountered, <i>pax</i> shall process (archive or copy) the directory
    515 itself but shall not process any files below the directory.</dd>
    516 </dl>
    517 <p class="tent">Specifying more than one of the mutually-exclusive options <b>-H</b> and <b>-L</b> shall not be considered an error
    518 and the last option specified shall determine the behavior of the utility.</p>
    519 <p class="tent">The options that operate on the names of files or archive members (<b>-c</b>, <b>-i</b>, <b>-n</b>, <b>-s</b>,
    520 <b>-u</b>, and <b>-v</b>) shall interact as follows. In <b>read</b> mode, the archive members shall be selected based on the
    521 user-specified <i>pattern</i> operands as modified by the <b>-c</b>, <b>-n</b>, and <b>-u</b> options. Then, any <b>-s</b> and
    522 <b>-i</b> options shall modify, in that order, the names of the selected files. The <b>-v</b> option shall write names resulting
    523 from these modifications.</p>
    524 <p class="tent">In <b>write</b> mode, the files shall be selected based on the user-specified pathnames as modified by the
    525 <b>-u</b> option. Then, any <b>-s</b> and <b>-i</b> options shall modify, in that order, the names of these selected files. The
    526 <b>-v</b> option shall write names resulting from these modifications.</p>
    527 <p class="tent">If both the <b>-u</b> and <b>-n</b> options are specified, <i>pax</i> shall not consider a file selected unless it
    528 is newer than the file to which it is compared.</p>
    529 <h5><a name="tag_20_94_04_01" id="tag_20_94_04_01"></a>List Mode Format Specifications</h5>
    530 <p class="tent">In <b>list</b> mode with the <b>-o</b> <b>listopt=format</b> option, the <i>format</i> argument shall be applied
    531 for each selected file. The <i>pax</i> utility shall append a &lt;newline&gt; to the <b>listopt</b> output for each selected file.
    532 The <i>format</i> argument shall be used as the <i>format</i> string described in XBD <a href=
    533 "../basedefs/V1_chap05.html#tag_05"><i>5. File Format Notation</i></a> , with the exceptions 1. through 6. defined in the EXTENDED
    534 DESCRIPTION section of <a href="../utilities/printf.html"><i>printf</i></a>, plus the following exceptions:</p>
    535 <dl compact>
    536 <dd></dd>
    537 <dt>7.</dt>
    538 <dd>The sequence (<i>keyword</i>) can occur before a format conversion specifier. The conversion argument is defined by the value
    539 of <i>keyword</i>. The implementation shall support the following keywords:
    540 <ul>
    541 <li class="tent">Any of the Field Name entries in <a href="#tagtcjh_21">ustar Header Block</a> and <a href=
    542 "#tagtcjh_22">Octet-Oriented cpio Archive Entry</a> . The implementation may support the <i>cpio</i> keywords without the leading
    543 <b>c_</b> in addition to the form required by <a href="#tagtcjh_22">Octet-Oriented cpio Archive Entry</a> .</li>
    544 <li class="tent">Any keyword defined for the extended header in <a href="#tag_20_94_13_03">pax Extended Header</a> .</li>
    545 <li class="tent">Any keyword provided as an implementation-defined extension within the extended header defined in <a href=
    546 "#tag_20_94_13_03">pax Extended Header</a> .</li>
    547 </ul>
    548 <p class="tent">For example, the sequence <tt>"%(charset)s"</tt> is the string value of the name of the character set in the
    549 extended header.</p>
    550 <p class="tent">The result of the keyword conversion argument shall be the value from the applicable header field or extended
    551 header, without any trailing NULs.</p>
    552 <p class="tent">All keyword values used as conversion arguments shall be translated from the UTF-8 encoding (or alternative
    553 encoding specified by any <b>hdrcharset</b> extended header record) to the character set appropriate for the local file system,
    554 user database, and so on, as applicable.</p>
    555 </dd>
    556 <dt>8.</dt>
    557 <dd>An additional conversion specifier character, <tt>T</tt>, shall be used to specify time formats. The <tt>T</tt> conversion
    558 specifier character can be preceded by the sequence (<i>keyword=</i><i>subformat</i>), where <i>subformat</i> is a date format as
    559 defined by <a href="../utilities/date.html"><i>date</i></a> operands. The default <i>keyword</i> shall be <b>mtime</b> and the
    560 default subformat shall be:
    561 <pre>
    562 <tt>%b %e %H:%M %Y
    563 </tt></pre></dd>
    564 <dt>9.</dt>
    565 <dd>An additional conversion specifier character, <tt>M</tt>, shall be used to specify the file mode string as defined in <a href=
    566 "../utilities/ls.html"><i>ls</i></a> Standard Output. If (<i>keyword</i>) is omitted, the <b>mode</b> keyword shall be used. For
    567 example, <tt>%.1M</tt> writes the single character corresponding to the &lt;<i>entry&nbsp;type</i>&gt; field of the <a href=
    568 "../utilities/ls.html"><i>ls</i></a> <b>-l</b> command.</dd>
    569 <dt>10.</dt>
    570 <dd>An additional conversion specifier character, <tt>D</tt>, shall be used to specify the device for block or special files, if
    571 applicable, in an implementation-defined format. If not applicable, and (<i>keyword</i>) is specified, then this conversion shall
    572 be equivalent to <tt>%(</tt><i>keyword</i><tt>)u</tt>. If not applicable, and (<i>keyword</i>) is omitted, then this conversion
    573 shall be equivalent to &lt;space&gt;.</dd>
    574 <dt>11.</dt>
    575 <dd>An additional conversion specifier character, <tt>F</tt>, shall be used to specify a pathname. The <tt>F</tt> conversion
    576 character can be preceded by a sequence of &lt;comma&gt;-separated keywords:
    577 <pre>
    578 <tt>(</tt><i>keyword</i><b>[</b><tt>,</tt><i>keyword</i><b>]</b><tt> ... )
    579 </tt></pre>
    580 <p class="tent">The values for all the keywords that are non-null shall be concatenated together, each separated by a <tt>'/'</tt>.
    581 The default shall be (<b>path</b>) if the keyword <b>path</b> is defined; otherwise, the default shall be
    582 (<b>prefix</b>,<b>name</b>).</p>
    583 </dd>
    584 <dt>12.</dt>
    585 <dd>An additional conversion specifier character, <tt>L</tt>, shall be used to specify a symbolic link expansion. If the current
    586 file is a symbolic link, then <tt>%L</tt> shall expand to:
    587 <pre>
    588 <tt>"%s -&gt; %s", &lt;</tt><i>value of keyword</i><tt>&gt;, &lt;</tt><i>contents of link</i><tt>&gt;
    589 </tt></pre>
    590 <p class="tent">Otherwise, the <tt>%L</tt> conversion specification shall be the equivalent of <tt>%F</tt>.</p>
    591 </dd>
    592 </dl>
    593 </blockquote>
    594 <h4 class="mansect"><a name="tag_20_94_05" id="tag_20_94_05"></a>OPERANDS</h4>
    595 <blockquote>
    596 <p>The following operands shall be supported:</p>
    597 <dl compact>
    598 <dd></dd>
    599 <dt><i>directory</i></dt>
    600 <dd>The destination directory pathname for <b>copy</b> mode.</dd>
    601 <dt><i>file</i></dt>
    602 <dd>A pathname of a file to be copied or archived.</dd>
    603 <dt><i>pattern</i></dt>
    604 <dd>A pattern matching one or more pathnames of archive members. A pattern needs to be given in the name-generating notation of the
    605 pattern matching notation in <a href="../utilities/V3_chap02.html#tag_19_14"><i>2.14 Pattern Matching Notation</i></a> , including
    606 the filename expansion rules in <a href="../utilities/V3_chap02.html#tag_19_14_03"><i>2.14.3 Patterns Used for Filename
    607 Expansion</i></a> . The default, if no <i>pattern</i> is specified, is to select all members in the archive.</dd>
    608 </dl>
    609 </blockquote>
    610 <h4 class="mansect"><a name="tag_20_94_06" id="tag_20_94_06"></a>STDIN</h4>
    611 <blockquote>
    612 <p>In <b>write</b> mode, the standard input shall be used only if no <i>file</i> operands are specified. It shall be a file
    613 containing a list of pathnames, each terminated by a &lt;newline&gt; character.</p>
    614 <p class="tent">In <b>list</b> and <b>read</b> modes, if <b>-f</b> is not specified, the standard input shall be an archive
    615 file.</p>
    616 <p class="tent">Otherwise, the standard input shall not be used.</p>
    617 </blockquote>
    618 <h4 class="mansect"><a name="tag_20_94_07" id="tag_20_94_07"></a>INPUT FILES</h4>
    619 <blockquote>
    620 <p>The input file named by the <i>archive</i> option-argument, or standard input when the archive is read from there, shall be a
    621 file formatted according to one of the specifications in the EXTENDED DESCRIPTION section or some other implementation-defined
    622 format.</p>
    623 <p class="tent">The file <b>/dev/tty</b> shall be used to write prompts and read responses.</p>
    624 </blockquote>
    625 <h4 class="mansect"><a name="tag_20_94_08" id="tag_20_94_08"></a>ENVIRONMENT VARIABLES</h4>
    626 <blockquote>
    627 <p>The following environment variables shall affect the execution of <i>pax</i>:</p>
    628 <dl compact>
    629 <dd></dd>
    630 <dt><i>LANG</i></dt>
    631 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
    632 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> the precedence of internationalization
    633 variables used to determine the values of locale categories.)</dd>
    634 <dt><i>LC_ALL</i></dt>
    635 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
    636 <dt><i>LC_COLLATE</i></dt>
    637 <dd><br>
    638 Determine the locale for the behavior of ranges, equivalence classes, and multi-character collating elements used in the pattern
    639 matching expressions for the <i>pattern</i> operand and the basic regular expression for the <b>-s</b> option.</dd>
    640 <dt><i>LC_CTYPE</i></dt>
    641 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
    642 opposed to multi-byte characters in arguments and input files), and the behavior of character classes used in the pattern matching
    643 expressions for the <i>pattern</i> operand and the basic regular expression for the <b>-s</b> option.</dd>
    644 <dt><i>LC_MESSAGES</i></dt>
    645 <dd><br>
    646 Determine the locale used to affect the format and contents of diagnostic messages and prompts written to standard error.</dd>
    647 <dt><i>LC_TIME</i></dt>
    648 <dd>Determine the format and contents of date and time strings when the <b>-v</b> option is specified.</dd>
    649 <dt><i>NLSPATH</i></dt>
    650 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    651 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
    652 "0"></dd>
    653 <dt><i>TMPDIR</i></dt>
    654 <dd>Determine the pathname that provides part of the default global extended header record file, as described for the <b>-o</b>
    655 <b>globexthdr=</b> keyword in the OPTIONS section.</dd>
    656 <dt><i>TZ</i></dt>
    657 <dd>Determine the timezone used to calculate date and time strings when the <b>-v</b> option is specified. If <i>TZ</i> is unset or
    658 null, an unspecified default timezone shall be used.</dd>
    659 </dl>
    660 </blockquote>
    661 <h4 class="mansect"><a name="tag_20_94_09" id="tag_20_94_09"></a>ASYNCHRONOUS EVENTS</h4>
    662 <blockquote>
    663 <p>Default.</p>
    664 </blockquote>
    665 <h4 class="mansect"><a name="tag_20_94_10" id="tag_20_94_10"></a>STDOUT</h4>
    666 <blockquote>
    667 <p>In <b>write</b> mode, if <b>-f</b> is not specified, the standard output shall be the archive formatted according to one of the
    668 specifications in the EXTENDED DESCRIPTION section, or some other implementation-defined format (see <b>-x</b> <i>format</i>).</p>
    669 <p class="tent">In <b>list</b> mode, when the <b>-o</b><b>listopt</b>=<i>format</i> has been specified, the selected archive
    670 members shall be written to standard output using the format described under <a href="#tag_20_94_04_01">List Mode Format
    671 Specifications</a> . In <b>list</b> mode without the <b>-o</b><b>listopt</b>=<i>format</i> option, the table of contents of the
    672 selected archive members shall be written to standard output using the following format:</p>
    673 <pre>
    674 <tt>"%s\n", &lt;</tt><i>pathname</i><tt>&gt;
    675 </tt></pre>
    676 <p class="tent">If the <b>-v</b> option is specified in <b>list</b> mode, the table of contents of the selected archive members
    677 shall be written to standard output using the following formats.</p>
    678 <p class="tent">For pathnames representing hard links to previous members of the archive:</p>
    679 <pre>
    680 <tt>"%sΔ==Δ%s\n", &lt;</tt><i>ls</i><tt> -l </tt><i>listing</i><tt>&gt;, &lt;</tt><i>linkname</i><tt>&gt;
    681 </tt></pre>
    682 <p class="tent">For all other pathnames:</p>
    683 <pre>
    684 <tt>"%s\n", &lt;</tt><i>ls</i><tt> -l </tt><i>listing</i><tt>&gt;
    685 </tt></pre>
    686 <p class="tent">where &lt;<i>ls&nbsp;</i>-l&nbsp;<i>listing</i>&gt; shall be the format specified by the <a href=
    687 "../utilities/ls.html"><i>ls</i></a> utility with the <b>-l</b> option. When writing pathnames in this format, it is unspecified
    688 what is written for fields for which the underlying archive format does not have the correct information, although the correct
    689 number of &lt;blank&gt;-separated fields shall be written.</p>
    690 <p class="tent">In <b>list</b> mode, standard output shall not be buffered more than a pathname (plus any associated information
    691 and a &lt;newline&gt; terminator) at a time.</p>
    692 </blockquote>
    693 <h4 class="mansect"><a name="tag_20_94_11" id="tag_20_94_11"></a>STDERR</h4>
    694 <blockquote>
    695 <p>If <b>-v</b> is specified in <b>read</b>, <b>write</b>, or <b>copy</b> modes, <i>pax</i> shall write the pathnames it processes
    696 to the standard error output using the following format:</p>
    697 <pre>
    698 <tt>"%s\n", &lt;</tt><i>pathname</i><tt>&gt;
    699 </tt></pre>
    700 <p class="tent">These pathnames shall be written as soon as processing is begun on the file or archive member, and shall be flushed
    701 to standard error. The trailing &lt;newline&gt;, which shall not be buffered, is written when the file has been read or
    702 written.</p>
    703 <p class="tent">If the <b>-s</b> option is specified, and the replacement string has a trailing <tt>'p'</tt>, substitutions shall
    704 be written to standard error in the following format:</p>
    705 <pre>
    706 <tt>"%sΔ&gt;&gt;Δ%s\n", &lt;</tt><i>original pathname</i><tt>&gt;, &lt;</tt><i>new pathname</i><tt>&gt;
    707 </tt></pre>
    708 <p class="tent">In all operating modes of <i>pax</i>, optional messages of unspecified format concerning the input archive format
    709 and volume number, the number of files, blocks, volumes, and media parts as well as other diagnostic messages may be written to
    710 standard error.</p>
    711 <p class="tent">In all formats, for both standard output and standard error, it is unspecified how non-printable characters in
    712 pathnames or link names are written.</p>
    713 <p class="tent">When using the <b>-x</b><b>pax</b> archive format, if a filename, link name, group name, owner name, or any other
    714 field in an extended header record cannot be translated between the codeset in use for that extended header record and the
    715 character set of the current locale, <i>pax</i> shall write a diagnostic message to standard error, shall process the file as
    716 described for the <b>-o</b> <b>invalid=</b> option, and then shall continue processing with the next file.</p>
    717 </blockquote>
    718 <h4 class="mansect"><a name="tag_20_94_12" id="tag_20_94_12"></a>OUTPUT FILES</h4>
    719 <blockquote>
    720 <p>In <b>read</b> mode, the extracted output files shall be of the archived file type. In <b>copy</b> mode, the copied output files
    721 shall be the type of the file being copied. In either mode, existing files in the destination hierarchy shall be overwritten only
    722 when all permission (<b>-p</b>), modification time (<b>-u</b>), and invalid-value (<b>-o</b><b>invalid=</b>) tests allow it.</p>
    723 <p class="tent">In <b>write</b> mode, the output file named by the <b>-f</b> option-argument shall be a file formatted according to
    724 one of the specifications in the EXTENDED DESCRIPTION section, or some other implementation-defined format.</p>
    725 </blockquote>
    726 <h4 class="mansect"><a name="tag_20_94_13" id="tag_20_94_13"></a>EXTENDED DESCRIPTION</h4>
    727 <blockquote>
    728 <h5><a name="tag_20_94_13_01" id="tag_20_94_13_01"></a>pax Interchange Format</h5>
    729 <p class="tent">A <i>pax</i> archive tape or file produced in the <b>-x</b><b>pax</b> format shall contain a series of blocks. The
    730 physical layout of the archive shall be identical to the <b>ustar</b> format described in <a href="#tag_20_94_13_06">ustar
    731 Interchange Format</a> . Each file archived shall be represented by the following sequence:</p>
    732 <ul>
    733 <li class="tent">An optional header block with extended header records. This header block is of the form described in <a href=
    734 "#tag_20_94_13_02">pax Header Block</a> , with a <i>typeflag</i> value of <b>x</b> or <b>g</b>. The extended header records,
    735 described in <a href="#tag_20_94_13_03">pax Extended Header</a> , shall be included as the data for this header block.</li>
    736 <li class="tent">A header block that describes the file. Any fields in the preceding optional extended header shall override the
    737 associated fields in this header block for this file.</li>
    738 <li class="tent">Zero or more blocks that contain the contents of the file.</li>
    739 </ul>
    740 <p class="tent">At the end of the archive file there shall be two 512-byte blocks filled with binary zeros, interpreted as an
    741 end-of-archive indicator.</p>
    742 <p class="tent">A schematic of an example archive with global extended header records and two actual files is shown in <a href=
    743 "#tagfcjh_1">pax Format Archive Example</a> . In the example, the second file in the archive has no extended header preceding it,
    744 presumably because it has no need for extended attributes.</p>
    745 <dl compact>
    746 <dd><img src=".././Figures/xcu-pax.gif"></dd>
    747 </dl>
    748 <p class="caption"><a name="tagfcjh_1" id="tagfcjh_1"></a> Figure: pax Format Archive Example</p>
    749 <h5><a name="tag_20_94_13_02" id="tag_20_94_13_02"></a>pax Header Block</h5>
    750 <p class="tent">The <b>pax</b> header block shall be identical to the <b>ustar</b> header block described in <a href=
    751 "#tag_20_94_13_06">ustar Interchange Format</a> , except that two additional <i>typeflag</i> values are defined:</p>
    752 <dl compact>
    753 <dd></dd>
    754 <dt><tt>x</tt></dt>
    755 <dd>Represents extended header records for the following file in the archive (which shall have its own <b>ustar</b> header block).
    756 The format of these extended header records shall be as described in <a href="#tag_20_94_13_03">pax Extended Header</a> .</dd>
    757 <dt><tt>g</tt></dt>
    758 <dd>Represents global extended header records for the following files in the archive. The format of these extended header records
    759 shall be as described in <a href="#tag_20_94_13_03">pax Extended Header</a> . Each value shall affect all subsequent files that do
    760 not override that value in their own extended header record and until another global extended header record is reached that
    761 provides another value for the same field. The <i>typeflag</i> <b>g</b> global headers should not be used with interchange media
    762 that could suffer partial data loss in transporting the archive.</dd>
    763 </dl>
    764 <p class="tent">For both of these types, the <i>size</i> field shall be the size of the extended header records in octets. The
    765 other fields in the header block are not meaningful to this version of the <i>pax</i> utility. However, if this archive is read by
    766 a <i>pax</i> utility conforming to the ISO&nbsp;POSIX-2:1993 standard, the header block fields are used to create a regular file
    767 that contains the extended header records as data. Therefore, header block field values should be selected to provide reasonable
    768 file access to this regular file.</p>
    769 <p class="tent">A further difference from the <b>ustar</b> header block is that data blocks for files of <i>typeflag</i> 1 (the
    770 digit one) (hard link) may be included, which means that the size field may be greater than zero. Archives created by <i>pax</i>
    771 <b>-o</b> <b>linkdata</b> shall include these data blocks with the hard links.</p>
    772 <h5><a name="tag_20_94_13_03" id="tag_20_94_13_03"></a>pax Extended Header</h5>
    773 <p class="tent">A <b>pax</b> extended header contains values that are inappropriate for the <b>ustar</b> header block because of
    774 limitations in that format: fields requiring a character encoding other than that described in the ISO/IEC&nbsp;646:1991 standard,
    775 fields representing file attributes not described in the <b>ustar</b> header, and fields whose format or length do not fit the
    776 requirements of the <b>ustar</b> header. The values in an extended header add attributes to the following file (or files; see the
    777 description of the <i>typeflag</i> <b>g</b> header block) or override values in the following header block(s), as indicated in the
    778 following list of keywords.</p>
    779 <p class="tent">An extended header shall consist of one or more records, each constructed as follows:</p>
    780 <pre>
    781 <tt>"%d %s=%s\n", &lt;</tt><i>length</i><tt>&gt;, &lt;</tt><i>keyword</i><tt>&gt;, &lt;</tt><i>value</i><tt>&gt;
    782 </tt></pre>
    783 <p class="tent">The extended header records shall be encoded according to the ISO/IEC&nbsp;10646-1:2020 standard UTF-8 encoding.
    784 The &lt;<i>length</i>&gt; field, &lt;blank&gt;, &lt;equals-sign&gt;, and &lt;newline&gt; shown shall be limited to the portable
    785 character set, as encoded in UTF-8. The &lt;<i>keyword</i>&gt; fields can be any UTF-8 characters. The &lt;<i>length</i>&gt; field
    786 shall be the decimal length of the extended header record in octets, including the trailing &lt;newline&gt;. If there is a
    787 <b>hdrcharset</b> extended header in effect for a file, the <i>value</i> field for any <b>gname</b>, <b>linkpath</b>, <b>path</b>,
    788 and <b>uname</b> extended header records shall be encoded using the character set specified by the <b>hdrcharset</b> extended
    789 header record; otherwise, the <i>value</i> field shall be encoded using UTF-8. The <i>value</i> field for all other keywords
    790 specified by POSIX.1-2024 shall be encoded using UTF-8.</p>
    791 <p class="tent">The &lt;<i>keyword</i>&gt; field shall be one of the entries from the following list or a keyword provided as an
    792 implementation extension. Keywords consisting entirely of lowercase letters, digits, and periods are reserved for future
    793 standardization. A keyword shall not include an &lt;equals-sign&gt;. (In the following list, the notations &quot;file(s)&quot; or
    794 &quot;block(s)&quot; is used to acknowledge that a keyword affects the following single file after a <i>typeflag</i> <b>x</b> extended
    795 header, but possibly multiple files after <i>typeflag</i> <b>g</b>. Any requirements in the list for <i>pax</i> to include a record
    796 when in <b>write</b> or <b>copy</b> mode shall apply only when such a record has not already been provided through the use of the
    797 <b>-o</b> option. When used in <b>copy</b> mode, <i>pax</i> shall behave as if an archive had been created with applicable extended
    798 header records and then extracted.)</p>
    799 <dl compact>
    800 <dd></dd>
    801 <dt><b>atime</b></dt>
    802 <dd>The file access time for the following file(s), equivalent to the value of the <i>st_atim</i> member of the <b>stat</b>
    803 structure for a file, as described by the <a href="../functions/stat.html"><i>stat</i>()</a> function. The access time shall be
    804 restored if the process has appropriate privileges required to do so. The format of the &lt;<i>value</i>&gt; shall be as described
    805 in <a href="#tag_20_94_13_05">pax Extended Header File Times</a> .</dd>
    806 <dt><b>charset</b></dt>
    807 <dd>The name of the character set used to encode the data in the following file(s). The entries in the following table are defined
    808 to refer to known standards; additional names may be agreed on between the originator and recipient.
    809 <center>
    810 <table border="1" cellpadding="3" align="center">
    811 <tr valign="top">
    812 <th align="center">
    813 <p class="tent"><b>&lt;value&gt;</b></p>
    814 </th>
    815 <th align="center">
    816 <p class="tent"><b>Formal Standard</b></p>
    817 </th>
    818 </tr>
    819 <tr valign="top">
    820 <td align="left">
    821 <p class="tent">ISO-IRΔ646Δ1990</p>
    822 </td>
    823 <td align="left">
    824 <p class="tent">ISO/IEC 646:1990</p>
    825 </td>
    826 </tr>
    827 <tr valign="top">
    828 <td align="left">
    829 <p class="tent">ISO-IRΔ8859Δ1Δ1998</p>
    830 </td>
    831 <td align="left">
    832 <p class="tent">ISO/IEC 8859-1:1998</p>
    833 </td>
    834 </tr>
    835 <tr valign="top">
    836 <td align="left">
    837 <p class="tent">ISO-IRΔ8859Δ2Δ1999</p>
    838 </td>
    839 <td align="left">
    840 <p class="tent">ISO/IEC 8859-2:1999</p>
    841 </td>
    842 </tr>
    843 <tr valign="top">
    844 <td align="left">
    845 <p class="tent">ISO-IRΔ8859Δ3Δ1999</p>
    846 </td>
    847 <td align="left">
    848 <p class="tent">ISO/IEC 8859-3:1999</p>
    849 </td>
    850 </tr>
    851 <tr valign="top">
    852 <td align="left">
    853 <p class="tent">ISO-IRΔ8859Δ4Δ1998</p>
    854 </td>
    855 <td align="left">
    856 <p class="tent">ISO/IEC 8859-4:1998</p>
    857 </td>
    858 </tr>
    859 <tr valign="top">
    860 <td align="left">
    861 <p class="tent">ISO-IRΔ8859Δ5Δ1999</p>
    862 </td>
    863 <td align="left">
    864 <p class="tent">ISO/IEC 8859-5:1999</p>
    865 </td>
    866 </tr>
    867 <tr valign="top">
    868 <td align="left">
    869 <p class="tent">ISO-IRΔ8859Δ6Δ1999</p>
    870 </td>
    871 <td align="left">
    872 <p class="tent">ISO/IEC 8859-6:1999</p>
    873 </td>
    874 </tr>
    875 <tr valign="top">
    876 <td align="left">
    877 <p class="tent">ISO-IRΔ8859Δ7Δ1987</p>
    878 </td>
    879 <td align="left">
    880 <p class="tent">ISO/IEC 8859-7:1987</p>
    881 </td>
    882 </tr>
    883 <tr valign="top">
    884 <td align="left">
    885 <p class="tent">ISO-IRΔ8859Δ8Δ1999</p>
    886 </td>
    887 <td align="left">
    888 <p class="tent">ISO/IEC 8859-8:1999</p>
    889 </td>
    890 </tr>
    891 <tr valign="top">
    892 <td align="left">
    893 <p class="tent">ISO-IRΔ8859Δ9Δ1999</p>
    894 </td>
    895 <td align="left">
    896 <p class="tent">ISO/IEC 8859-9:1999</p>
    897 </td>
    898 </tr>
    899 <tr valign="top">
    900 <td align="left">
    901 <p class="tent">ISO-IRΔ8859Δ10Δ1998</p>
    902 </td>
    903 <td align="left">
    904 <p class="tent">ISO/IEC 8859-10:1998</p>
    905 </td>
    906 </tr>
    907 <tr valign="top">
    908 <td align="left">
    909 <p class="tent">ISO-IRΔ8859Δ13Δ1998</p>
    910 </td>
    911 <td align="left">
    912 <p class="tent">ISO/IEC 8859-13:1998</p>
    913 </td>
    914 </tr>
    915 <tr valign="top">
    916 <td align="left">
    917 <p class="tent">ISO-IRΔ8859Δ14Δ1998</p>
    918 </td>
    919 <td align="left">
    920 <p class="tent">ISO/IEC 8859-14:1998</p>
    921 </td>
    922 </tr>
    923 <tr valign="top">
    924 <td align="left">
    925 <p class="tent">ISO-IRΔ8859Δ15Δ1999</p>
    926 </td>
    927 <td align="left">
    928 <p class="tent">ISO/IEC 8859-15:1999</p>
    929 </td>
    930 </tr>
    931 <tr valign="top">
    932 <td align="left">
    933 <p class="tent">ISO-IRΔ10646Δ2000</p>
    934 </td>
    935 <td align="left">
    936 <p class="tent">ISO/IEC 10646:2000</p>
    937 </td>
    938 </tr>
    939 <tr valign="top">
    940 <td align="left">
    941 <p class="tent">ISO-IRΔ10646Δ2000ΔUTF-8</p>
    942 </td>
    943 <td align="left">
    944 <p class="tent">ISO/IEC 10646, UTF-8 encoding</p>
    945 </td>
    946 </tr>
    947 <tr valign="top">
    948 <td align="left">
    949 <p class="tent">BINARY</p>
    950 </td>
    951 <td align="left">
    952 <p class="tent">None.</p>
    953 </td>
    954 </tr>
    955 </table>
    956 </center>
    957 <p class="tent">The encoding is included in an extended header for information only; when <i>pax</i> is used as described in
    958 POSIX.1-2024, it shall not translate the file data into any other encoding. The <b>BINARY</b> entry indicates unencoded binary
    959 data.</p>
    960 <p class="tent">When used in <b>write</b> or <b>copy</b> mode, it is implementation-defined whether <i>pax</i> includes a
    961 <b>charset</b> extended header record for a file.</p>
    962 </dd>
    963 <dt><b>comment</b></dt>
    964 <dd>A series of characters used as a comment. All characters in the &lt;<i>value</i>&gt; field shall be ignored by <i>pax</i>.</dd>
    965 <dt><b>gid</b></dt>
    966 <dd>The group ID of the group that owns the file, expressed as a decimal number using digits from the ISO/IEC&nbsp;646:1991
    967 standard. This record shall override the <i>gid</i> field in the following header block(s). When used in <b>write</b> or
    968 <b>copy</b> mode, <i>pax</i> shall include a <i>gid</i> extended header record for each file whose group ID is greater than 2097151
    969 (octal 7777777).</dd>
    970 <dt><b>gname</b></dt>
    971 <dd>The group of the file(s), formatted as a group name in the group database. This record shall override the <i>gid</i> and
    972 <i>gname</i> fields in the following header block(s), and any <i>gid</i> extended header record. When used in <b>read</b>,
    973 <b>copy</b>, or <b>list</b> mode, <i>pax</i> shall translate the name from the encoding in the header record to the character set
    974 appropriate for the group database on the receiving system. If any of the characters cannot be translated, and if neither the
    975 <b>-o</b><b>invalid=UTF-8</b> option nor the <b>-o</b><b>invalid=binary</b> option is specified, the results are
    976 implementation-defined. When used in <b>write</b> or <b>copy</b> mode, <i>pax</i> shall include a <b>gname</b> extended header
    977 record for each file whose group name cannot be represented entirely with the letters and digits of the portable character
    978 set.</dd>
    979 <dt><b>hdrcharset</b></dt>
    980 <dd>The name of the character set used to encode the value field of the <b>gname</b>, <b>linkpath</b>, <b>path</b>, and
    981 <b>uname</b> <i>pax</i> extended header records. The entries in the following table are defined to refer to known standards;
    982 additional names may be agreed between the originator and the recipient.<br>
    983 <center>
    984 <table border="1" cellpadding="3" align="center">
    985 <tr valign="top">
    986 <th align="center">
    987 <p class="tent"><b>&lt;value&gt;</b></p>
    988 </th>
    989 <th align="center">
    990 <p class="tent"><b>Formal Standard</b></p>
    991 </th>
    992 </tr>
    993 <tr valign="top">
    994 <td align="left">
    995 <p class="tent">ISO-IRΔ10646Δ2000ΔUTF-8</p>
    996 </td>
    997 <td align="left">
    998 <p class="tent">ISO/IEC 10646, UTF-8 encoding</p>
    999 </td>
   1000 </tr>
   1001 <tr valign="top">
   1002 <td align="left">
   1003 <p class="tent">BINARY</p>
   1004 </td>
   1005 <td align="left">
   1006 <p class="tent">None.</p>
   1007 </td>
   1008 </tr>
   1009 </table>
   1010 </center>
   1011 <p class="tent">If no <b>hdrcharset</b> extended header record is specified, the default character set used to encode all values in
   1012 extended header records shall be the ISO/IEC&nbsp;10646-1:2020 standard UTF-8 encoding.</p>
   1013 <p class="tent">The <b>BINARY</b> entry indicates that all values recorded in extended headers for affected files are unencoded
   1014 binary data from the underlying system.</p>
   1015 </dd>
   1016 <dt><b>linkpath</b></dt>
   1017 <dd>The pathname of a link being created to another file, of any type, previously archived. This record shall override the
   1018 <i>linkname</i> field in the following <b>ustar</b> header block(s). The following <b>ustar</b> header block shall determine the
   1019 type of link created. If <i>typeflag</i> of the following header block is 1, it shall be a hard link. If <i>typeflag</i> is 2, it
   1020 shall be a symbolic link and the <b>linkpath</b> value shall be the contents of the symbolic link. The <i>pax</i> utility shall
   1021 translate the name of the link (contents of the symbolic link) from the encoding in the header to the character set appropriate for
   1022 the local file system. When used in <b>write</b> or <b>copy</b> mode, <i>pax</i> shall include a <b>linkpath</b> extended header
   1023 record for each link whose pathname cannot be represented entirely with the members of the portable character set other than
   1024 NUL.</dd>
   1025 <dt><b>mtime</b></dt>
   1026 <dd>The file modification time of the following file(s), equivalent to the value of the <i>st_mtim</i> member of the <b>stat</b>
   1027 structure for a file, as described in the <a href="../functions/stat.html"><i>stat</i>()</a> function. This record shall override
   1028 the <i>mtime</i> field in the following header block(s). The modification time shall be restored if the process has appropriate
   1029 privileges required to do so. The format of the &lt;<i>value</i>&gt; shall be as described in <a href="#tag_20_94_13_05">pax
   1030 Extended Header File Times</a> .</dd>
   1031 <dt><b>path</b></dt>
   1032 <dd>The pathname of the following file(s). This record shall override the <i>name</i> and <i>prefix</i> fields in the following
   1033 header block(s). The <i>pax</i> utility shall translate the pathname of the file from the encoding in the header to the character
   1034 set appropriate for the local file system.
   1035 <p class="tent">When used in <b>write</b> or <b>copy</b> mode, <i>pax</i> shall include a <i>path</i> extended header record for
   1036 each file whose pathname cannot be represented entirely with the members of the portable character set other than NUL.</p>
   1037 </dd>
   1038 <dt><b>realtime.</b><i>any</i></dt>
   1039 <dd>The keywords prefixed by &quot;realtime.&quot; are reserved for future standardization.</dd>
   1040 <dt><b>security.</b><i>any</i></dt>
   1041 <dd>The keywords prefixed by &quot;security.&quot; are reserved for future standardization.</dd>
   1042 <dt><b>size</b></dt>
   1043 <dd>The size of the file in octets, expressed as a decimal number using digits from the ISO/IEC&nbsp;646:1991 standard. This record
   1044 shall override the <i>size</i> field in the following header block(s). When used in <b>write</b> or <b>copy</b> mode, <i>pax</i>
   1045 shall include a <i>size</i> extended header record for each file with a size value greater than 8589934591 (octal
   1046 77777777777).</dd>
   1047 <dt><b>uid</b></dt>
   1048 <dd>The user ID of the file owner, expressed as a decimal number using digits from the ISO/IEC&nbsp;646:1991 standard. This record
   1049 shall override the <i>uid</i> field in the following header block(s). When used in <b>write</b> or <b>copy</b> mode, <i>pax</i>
   1050 shall include a <i>uid</i> extended header record for each file whose owner ID is greater than 2097151 (octal 7777777).</dd>
   1051 <dt><b>uname</b></dt>
   1052 <dd>The owner of the following file(s), formatted as a user name in the user database. This record shall override the <i>uid</i>
   1053 and <i>uname</i> fields in the following header block(s), and any <i>uid</i> extended header record. When used in <b>read</b>,
   1054 <b>copy</b>, or <b>list</b> mode, <i>pax</i> shall translate the name from the encoding in the header record to the character set
   1055 appropriate for the user database on the receiving system. If any of the characters cannot be translated, and if neither the
   1056 <b>-o</b><b>invalid=UTF-8</b> option nor the <b>-o</b><b>invalid=binary</b> option is specified, the results are
   1057 implementation-defined. When used in <b>write</b> or <b>copy</b> mode, <i>pax</i> shall include a <b>uname</b> extended header
   1058 record for each file whose user name cannot be represented entirely with the letters and digits of the portable character set.</dd>
   1059 </dl>
   1060 <p class="tent">If the &lt;<i>value</i>&gt; field is zero length, it shall delete any header block field, previously entered
   1061 extended header value, or global extended header value of the same name.</p>
   1062 <p class="tent">If a keyword in an extended header record (or in a <b>-o</b> option-argument) overrides or deletes a corresponding
   1063 field in the <b>ustar</b> header block, <i>pax</i> shall ignore the contents of that header block field.</p>
   1064 <p class="tent">Unlike the <b>ustar</b> header block fields, NULs shall not delimit &lt;<i>value</i>&gt;s; all characters within
   1065 the &lt;<i>value</i>&gt; field shall be considered data for the field. None of the length limitations of the <b>ustar</b> header
   1066 block fields in <a href="#tagtcjh_21">ustar Header Block</a> shall apply to the extended header records.</p>
   1067 <h5><a name="tag_20_94_13_04" id="tag_20_94_13_04"></a>pax Extended Header Keyword Precedence</h5>
   1068 <p class="tent">This section describes the precedence in which the various header records and fields and command line options are
   1069 selected to apply to a file in the archive. When <i>pax</i> is used in <b>read</b> or <b>list</b> modes, it shall determine a file
   1070 attribute in the following sequence:</p>
   1071 <ol>
   1072 <li class="tent">If <b>-o</b><b>delete=keyword-prefix</b> is used, the affected attributes shall be determined from step 7., if
   1073 applicable, or ignored otherwise.</li>
   1074 <li class="tent">If <b>-o</b><i>keyword</i>:= is used, the affected attributes shall be ignored.</li>
   1075 <li class="tent">If <b>-o</b><b>keyword:=value</b> is used, the affected attribute shall be assigned the value.</li>
   1076 <li class="tent">If there is a <i>typeflag</i> <b>x</b> extended header record, the affected attribute shall be assigned the
   1077 &lt;<i>value</i>&gt;. When extended header records conflict, the last one given in the header shall take precedence.</li>
   1078 <li class="tent">If <b>-o</b><b>keyword=value</b> is used, the affected attribute shall be assigned the value.</li>
   1079 <li class="tent">If there is a <i>typeflag</i> <b>g</b> global extended header record, the affected attribute shall be assigned the
   1080 &lt;<i>value</i>&gt;. When global extended header records conflict, the last one given in the global header shall take
   1081 precedence.</li>
   1082 <li class="tent">Otherwise, the attribute shall be determined from the <b>ustar</b> header block.</li>
   1083 </ol>
   1084 <h5><a name="tag_20_94_13_05" id="tag_20_94_13_05"></a>pax Extended Header File Times</h5>
   1085 <p class="tent">The <i>pax</i> utility shall write an <b>mtime</b> record for each file in <b>write</b> or <b>copy</b> modes if the
   1086 file's modification time cannot be represented exactly in the <b>ustar</b> header logical record described in <a href=
   1087 "#tag_20_94_13_06">ustar Interchange Format</a> . This can occur if the time is out of <b>ustar</b> range, or if the file system of
   1088 the underlying implementation supports non-integer time granularities and the time is not an integer. All of these time records
   1089 shall be formatted as a decimal representation of the time in seconds since the Epoch. If a &lt;period&gt; (<tt>'.'</tt>) decimal
   1090 point character is present, the digits to the right of the point shall represent the units of a subsecond timing granularity, where
   1091 the first digit is tenths of a second and each subsequent digit is a tenth of the previous digit. In <b>read</b> or <b>copy</b>
   1092 mode, the <i>pax</i> utility shall truncate the time of a file to the greatest value that is not greater than the input header file
   1093 time. In <b>write</b> or <b>copy</b> mode, the <i>pax</i> utility shall output a time exactly if it can be represented exactly as a
   1094 decimal number, and otherwise shall generate only enough digits so that the same time shall be recovered if the file is extracted
   1095 on a system whose underlying implementation supports the same time granularity.</p>
   1096 <h5><a name="tag_20_94_13_06" id="tag_20_94_13_06"></a>ustar Interchange Format</h5>
   1097 <p class="tent">A <b>ustar</b> archive tape or file shall contain a series of logical records. Each logical record shall be a
   1098 fixed-size logical record of 512 octets (see below). Although this format may be thought of as being stored on 9-track
   1099 industry-standard 12.7 mm (0.5 in) magnetic tape, other types of transportable media are not excluded. Each file archived shall be
   1100 represented by a header logical record that describes the file, followed by zero or more logical records that give the contents of
   1101 the file. At the end of the archive file there shall be two 512-octet logical records filled with binary zeros, interpreted as an
   1102 end-of-archive indicator.</p>
   1103 <p class="tent">The logical records may be grouped for physical I/O operations, as described under the <b>-b</b><i>blocksize</i>
   1104 and <b>-x</b> <b>ustar</b> options. Each group of logical records may be written with a single operation equivalent to the <a href=
   1105 "../functions/write.html"><i>write</i>()</a> function. On magnetic tape, the result of this write shall be a single tape physical
   1106 block. The last physical block shall always be the full size, so logical records after the two zero logical records may contain
   1107 undefined data.</p>
   1108 <p class="tent">The header logical record shall be structured as shown in the following table. All lengths and offsets are in
   1109 decimal.<br></p>
   1110 <p class="caption"><a name="tagtcjh_21" id="tagtcjh_21"></a> Table: ustar Header Block</p>
   1111 <center>
   1112 <table border="1" cellpadding="3" align="center">
   1113 <tr valign="top">
   1114 <th align="center">
   1115 <p class="tent"><b>Field Name</b></p>
   1116 </th>
   1117 <th align="center">
   1118 <p class="tent"><b>Octet Offset</b></p>
   1119 </th>
   1120 <th align="center">
   1121 <p class="tent"><b>Length (in Octets)</b></p>
   1122 </th>
   1123 </tr>
   1124 <tr valign="top">
   1125 <td align="left">
   1126 <p class="tent"><i>name</i></p>
   1127 </td>
   1128 <td align="left">
   1129 <p class="tent">0</p>
   1130 </td>
   1131 <td align="left">
   1132 <p class="tent">100</p>
   1133 </td>
   1134 </tr>
   1135 <tr valign="top">
   1136 <td align="left">
   1137 <p class="tent"><i>mode</i></p>
   1138 </td>
   1139 <td align="left">
   1140 <p class="tent">100</p>
   1141 </td>
   1142 <td align="left">
   1143 <p class="tent">8</p>
   1144 </td>
   1145 </tr>
   1146 <tr valign="top">
   1147 <td align="left">
   1148 <p class="tent"><i>uid</i></p>
   1149 </td>
   1150 <td align="left">
   1151 <p class="tent">108</p>
   1152 </td>
   1153 <td align="left">
   1154 <p class="tent">8</p>
   1155 </td>
   1156 </tr>
   1157 <tr valign="top">
   1158 <td align="left">
   1159 <p class="tent"><i>gid</i></p>
   1160 </td>
   1161 <td align="left">
   1162 <p class="tent">116</p>
   1163 </td>
   1164 <td align="left">
   1165 <p class="tent">8</p>
   1166 </td>
   1167 </tr>
   1168 <tr valign="top">
   1169 <td align="left">
   1170 <p class="tent"><i>size</i></p>
   1171 </td>
   1172 <td align="left">
   1173 <p class="tent">124</p>
   1174 </td>
   1175 <td align="left">
   1176 <p class="tent">12</p>
   1177 </td>
   1178 </tr>
   1179 <tr valign="top">
   1180 <td align="left">
   1181 <p class="tent"><i>mtime</i></p>
   1182 </td>
   1183 <td align="left">
   1184 <p class="tent">136</p>
   1185 </td>
   1186 <td align="left">
   1187 <p class="tent">12</p>
   1188 </td>
   1189 </tr>
   1190 <tr valign="top">
   1191 <td align="left">
   1192 <p class="tent"><i>chksum</i></p>
   1193 </td>
   1194 <td align="left">
   1195 <p class="tent">148</p>
   1196 </td>
   1197 <td align="left">
   1198 <p class="tent">8</p>
   1199 </td>
   1200 </tr>
   1201 <tr valign="top">
   1202 <td align="left">
   1203 <p class="tent"><i>typeflag</i></p>
   1204 </td>
   1205 <td align="left">
   1206 <p class="tent">156</p>
   1207 </td>
   1208 <td align="left">
   1209 <p class="tent">1</p>
   1210 </td>
   1211 </tr>
   1212 <tr valign="top">
   1213 <td align="left">
   1214 <p class="tent"><i>linkname</i></p>
   1215 </td>
   1216 <td align="left">
   1217 <p class="tent">157</p>
   1218 </td>
   1219 <td align="left">
   1220 <p class="tent">100</p>
   1221 </td>
   1222 </tr>
   1223 <tr valign="top">
   1224 <td align="left">
   1225 <p class="tent"><i>magic</i></p>
   1226 </td>
   1227 <td align="left">
   1228 <p class="tent">257</p>
   1229 </td>
   1230 <td align="left">
   1231 <p class="tent">6</p>
   1232 </td>
   1233 </tr>
   1234 <tr valign="top">
   1235 <td align="left">
   1236 <p class="tent"><i>version</i></p>
   1237 </td>
   1238 <td align="left">
   1239 <p class="tent">263</p>
   1240 </td>
   1241 <td align="left">
   1242 <p class="tent">2</p>
   1243 </td>
   1244 </tr>
   1245 <tr valign="top">
   1246 <td align="left">
   1247 <p class="tent"><i>uname</i></p>
   1248 </td>
   1249 <td align="left">
   1250 <p class="tent">265</p>
   1251 </td>
   1252 <td align="left">
   1253 <p class="tent">32</p>
   1254 </td>
   1255 </tr>
   1256 <tr valign="top">
   1257 <td align="left">
   1258 <p class="tent"><i>gname</i></p>
   1259 </td>
   1260 <td align="left">
   1261 <p class="tent">297</p>
   1262 </td>
   1263 <td align="left">
   1264 <p class="tent">32</p>
   1265 </td>
   1266 </tr>
   1267 <tr valign="top">
   1268 <td align="left">
   1269 <p class="tent"><i>devmajor</i></p>
   1270 </td>
   1271 <td align="left">
   1272 <p class="tent">329</p>
   1273 </td>
   1274 <td align="left">
   1275 <p class="tent">8</p>
   1276 </td>
   1277 </tr>
   1278 <tr valign="top">
   1279 <td align="left">
   1280 <p class="tent"><i>devminor</i></p>
   1281 </td>
   1282 <td align="left">
   1283 <p class="tent">337</p>
   1284 </td>
   1285 <td align="left">
   1286 <p class="tent">8</p>
   1287 </td>
   1288 </tr>
   1289 <tr valign="top">
   1290 <td align="left">
   1291 <p class="tent"><i>prefix</i></p>
   1292 </td>
   1293 <td align="left">
   1294 <p class="tent">345</p>
   1295 </td>
   1296 <td align="left">
   1297 <p class="tent">155</p>
   1298 </td>
   1299 </tr>
   1300 </table>
   1301 </center>
   1302 <p class="tent">All characters in the header logical record shall be represented in the coded character set of the
   1303 ISO/IEC&nbsp;646:1991 standard. For maximum portability between implementations, names should be selected from characters
   1304 represented by the portable filename character set as octets with the most significant bit zero. If an implementation supports the
   1305 use of characters outside of &lt;slash&gt; and the portable filename character set in names for files, users, and groups, one or
   1306 more implementation-defined encodings of these characters shall be provided for interchange purposes.</p>
   1307 <p class="tent">However, the <i>pax</i> utility shall never create filenames on the local system that cannot be accessed via the
   1308 procedures described in POSIX.1-2024. If a filename is found on the medium that would create an invalid filename, it is
   1309 implementation-defined whether the data from the file is stored on the file hierarchy and under what name it is stored. The
   1310 <i>pax</i> utility may choose to ignore these files as long as it produces an error indicating that the file is being ignored.</p>
   1311 <p class="tent">Each field within the header logical record is contiguous; that is, there is no padding used. Each character on the
   1312 archive medium shall be stored contiguously.</p>
   1313 <p class="tent">The fields <i>magic</i>, <i>uname</i>, and <i>gname</i> are character strings each terminated by a NUL character.
   1314 The fields <i>name</i>, <i>linkname</i>, and <i>prefix</i> are NUL-terminated character strings except when all characters in the
   1315 array contain non-NUL characters including the last character. The <i>version</i> field is two octets containing the characters
   1316 <tt>"00"</tt> (zero-zero). The <i>typeflag</i> contains a single character. All other fields are leading zero-filled octal numbers
   1317 using digits from the ISO/IEC&nbsp;646:1991 standard IRV. Each numeric field is terminated by one or more &lt;space&gt; or NUL
   1318 characters.</p>
   1319 <p class="tent">The <i>name</i> and the <i>prefix</i> fields shall produce the pathname of the file. A new pathname shall be
   1320 formed, if <i>prefix</i> is not an empty string (its first character is not NUL), by concatenating <i>prefix</i> (up to the first
   1321 NUL character), a &lt;slash&gt; character, and <i>name</i>; otherwise, <i>name</i> is used alone. In either case, <i>name</i> is
   1322 terminated at the first NUL character. If <i>prefix</i> begins with a NUL character, it shall be ignored. In this manner, pathnames
   1323 of at most 256 characters can be supported. If a pathname does not fit in the space provided, <i>pax</i> shall notify the user of
   1324 the error, and shall not store any part of the file—header or data—on the medium.</p>
   1325 <p class="tent">The <i>linkname</i> field, described below, shall not use the <i>prefix</i> to produce a pathname. As such, a
   1326 <i>linkname</i> is limited to 100 characters. If the name does not fit in the space provided, <i>pax</i> shall notify the user of
   1327 the error, and shall not attempt to store the link on the medium.</p>
   1328 <p class="tent">The <i>mode</i> field provides 12 bits encoded in the ISO/IEC&nbsp;646:1991 standard octal digit representation.
   1329 The encoded bits shall represent the following values:<br></p>
   1330 <p class="caption">Table: ustar <i>mode</i> Field</p>
   1331 <center>
   1332 <table border="1" cellpadding="3" align="center">
   1333 <tr valign="top">
   1334 <th align="center">
   1335 <p class="tent"><b>Bit Value</b></p>
   1336 </th>
   1337 <th align="center">
   1338 <p class="tent"><b>POSIX.1-2024 Bit</b></p>
   1339 </th>
   1340 <th align="center">
   1341 <p class="tent"><b>Description</b></p>
   1342 </th>
   1343 </tr>
   1344 <tr valign="top">
   1345 <td align="left">
   1346 <p class="tent">04000</p>
   1347 </td>
   1348 <td align="left">
   1349 <p class="tent">S_ISUID</p>
   1350 </td>
   1351 <td align="left">
   1352 <p class="tent">Set UID on execution.</p>
   1353 </td>
   1354 </tr>
   1355 <tr valign="top">
   1356 <td align="left">
   1357 <p class="tent">02000</p>
   1358 </td>
   1359 <td align="left">
   1360 <p class="tent">S_ISGID</p>
   1361 </td>
   1362 <td align="left">
   1363 <p class="tent">Set GID on execution.</p>
   1364 </td>
   1365 </tr>
   1366 <tr valign="top">
   1367 <td align="left">
   1368 <p class="tent">01000</p>
   1369 </td>
   1370 <td align="left">
   1371 <p class="tent">&lt;reserved&gt;</p>
   1372 </td>
   1373 <td align="left">
   1374 <p class="tent">Reserved for future standardization.</p>
   1375 </td>
   1376 </tr>
   1377 <tr valign="top">
   1378 <td align="left">
   1379 <p class="tent">00400</p>
   1380 </td>
   1381 <td align="left">
   1382 <p class="tent">S_IRUSR</p>
   1383 </td>
   1384 <td align="left">
   1385 <p class="tent">Read permission for file owner class.</p>
   1386 </td>
   1387 </tr>
   1388 <tr valign="top">
   1389 <td align="left">
   1390 <p class="tent">00200</p>
   1391 </td>
   1392 <td align="left">
   1393 <p class="tent">S_IWUSR</p>
   1394 </td>
   1395 <td align="left">
   1396 <p class="tent">Write permission for file owner class.</p>
   1397 </td>
   1398 </tr>
   1399 <tr valign="top">
   1400 <td align="left">
   1401 <p class="tent">00100</p>
   1402 </td>
   1403 <td align="left">
   1404 <p class="tent">S_IXUSR</p>
   1405 </td>
   1406 <td align="left">
   1407 <p class="tent">Execute/search permission for file owner class.</p>
   1408 </td>
   1409 </tr>
   1410 <tr valign="top">
   1411 <td align="left">
   1412 <p class="tent">00040</p>
   1413 </td>
   1414 <td align="left">
   1415 <p class="tent">S_IRGRP</p>
   1416 </td>
   1417 <td align="left">
   1418 <p class="tent">Read permission for file group class.</p>
   1419 </td>
   1420 </tr>
   1421 <tr valign="top">
   1422 <td align="left">
   1423 <p class="tent">00020</p>
   1424 </td>
   1425 <td align="left">
   1426 <p class="tent">S_IWGRP</p>
   1427 </td>
   1428 <td align="left">
   1429 <p class="tent">Write permission for file group class.</p>
   1430 </td>
   1431 </tr>
   1432 <tr valign="top">
   1433 <td align="left">
   1434 <p class="tent">00010</p>
   1435 </td>
   1436 <td align="left">
   1437 <p class="tent">S_IXGRP</p>
   1438 </td>
   1439 <td align="left">
   1440 <p class="tent">Execute/search permission for file group class.</p>
   1441 </td>
   1442 </tr>
   1443 <tr valign="top">
   1444 <td align="left">
   1445 <p class="tent">00004</p>
   1446 </td>
   1447 <td align="left">
   1448 <p class="tent">S_IROTH</p>
   1449 </td>
   1450 <td align="left">
   1451 <p class="tent">Read permission for file other class.</p>
   1452 </td>
   1453 </tr>
   1454 <tr valign="top">
   1455 <td align="left">
   1456 <p class="tent">00002</p>
   1457 </td>
   1458 <td align="left">
   1459 <p class="tent">S_IWOTH</p>
   1460 </td>
   1461 <td align="left">
   1462 <p class="tent">Write permission for file other class.</p>
   1463 </td>
   1464 </tr>
   1465 <tr valign="top">
   1466 <td align="left">
   1467 <p class="tent">00001</p>
   1468 </td>
   1469 <td align="left">
   1470 <p class="tent">S_IXOTH</p>
   1471 </td>
   1472 <td align="left">
   1473 <p class="tent">Execute/search permission for file other class.</p>
   1474 </td>
   1475 </tr>
   1476 </table>
   1477 </center>
   1478 <p class="tent">When appropriate privileges are required to set one of these mode bits, and the user restoring the files from the
   1479 archive does not have appropriate privileges, the mode bits for which the user does not have appropriate privileges shall be
   1480 ignored. Some of the mode bits in the archive format are not mentioned elsewhere in this volume of POSIX.1-2024. If the
   1481 implementation does not support those bits, they may be ignored.</p>
   1482 <p class="tent">The <i>uid</i> and <i>gid</i> fields are the user and group ID of the owner and group of the file,
   1483 respectively.</p>
   1484 <p class="tent">The <i>size</i> field is the size of the file in octets. If the <i>typeflag</i> field is set to specify a file to
   1485 be of type 1 (a hard link) or 2 (a symbolic link), the <i>size</i> field shall be specified as zero. If the <i>typeflag</i> field
   1486 is set to specify a file of type 5 (directory), the <i>size</i> field shall be interpreted as described under the definition of
   1487 that record type. No data logical records are stored for types 1, 2, or 5. If the <i>typeflag</i> field is set to 3 (character
   1488 special file), 4 (block special file), or 6 (FIFO), the meaning of the <i>size</i> field is unspecified by this volume of
   1489 POSIX.1-2024, and no data logical records shall be stored on the medium. Additionally, for type 6, the <i>size</i> field shall be
   1490 ignored when reading. If the <i>typeflag</i> field is set to any other value, the number of logical records written following the
   1491 header shall be (<i>size</i>+511)/512, ignoring any fraction in the result of the division.</p>
   1492 <p class="tent">The <i>mtime</i> field shall be the modification time of the file at the time it was archived. It is the
   1493 ISO/IEC&nbsp;646:1991 standard representation of the octal value of the modification time obtained from the <a href=
   1494 "../functions/stat.html"><i>stat</i>()</a> function.</p>
   1495 <p class="tent">The <i>chksum</i> field shall be the ISO/IEC&nbsp;646:1991 standard IRV representation of the octal value of the
   1496 simple sum of all octets in the header logical record. Each octet in the header shall be treated as an unsigned value. These values
   1497 shall be added to an unsigned integer, initialized to zero, the precision of which is not less than 17 bits. When calculating the
   1498 checksum, the <i>chksum</i> field is treated as if it were all &lt;space&gt; characters.</p>
   1499 <p class="tent">The <i>typeflag</i> field specifies the type of file archived. If a particular implementation does not recognize
   1500 the type, or the user does not have appropriate privileges to create that type, the file shall be extracted as if it were a regular
   1501 file if the file type is defined to have a meaning for the <i>size</i> field that could cause data logical records to be written on
   1502 the medium (see the previous description for <i>size</i>). If conversion to a regular file occurs, the <i>pax</i> utility shall
   1503 produce an error indicating that the conversion took place. All of the <i>typeflag</i> fields shall be coded in the
   1504 ISO/IEC&nbsp;646:1991 standard IRV:</p>
   1505 <dl compact>
   1506 <dd></dd>
   1507 <dt><tt>0</tt></dt>
   1508 <dd>Represents a regular file. For backwards-compatibility, a <i>typeflag</i> value of binary zero (<tt>'\0'</tt>) should be
   1509 recognized as meaning a regular file when extracting files from the archive. Archives written with this version of the archive file
   1510 format create regular files with a <i>typeflag</i> value of the ISO/IEC&nbsp;646:1991 standard IRV <tt>'0'</tt>.</dd>
   1511 <dt><tt>1</tt></dt>
   1512 <dd>Represents a file linked to another file, of any type, previously archived. Such files are identified by having the same device
   1513 and file serial numbers, and pathnames that refer to different directory entries. All such files shall be archived as linked files.
   1514 The linked-to name is specified in the <i>linkname</i> field with a NUL-character terminator if it is less than 100 octets in
   1515 length.</dd>
   1516 <dt><tt>2</tt></dt>
   1517 <dd>Represents a symbolic link. The contents of the symbolic link shall be stored in the <i>linkname</i> field.</dd>
   1518 <dt><tt>3,4</tt></dt>
   1519 <dd>Represent character special files and block special files respectively. In this case the <i>devmajor</i> and <i>devminor</i>
   1520 fields shall contain information defining the device, the format of which is unspecified by this volume of POSIX.1-2024.
   1521 Implementations may map the device specifications to their own local specification or may ignore the entry.</dd>
   1522 <dt><tt>5</tt></dt>
   1523 <dd>Specifies a directory or subdirectory. On systems where disk allocation is performed on a directory basis, the <i>size</i>
   1524 field shall contain the maximum number of octets (which may be rounded to the nearest disk block allocation unit) that the
   1525 directory may hold. A <i>size</i> field of zero indicates no such limiting. Systems that do not support limiting in this manner
   1526 should ignore the <i>size</i> field.</dd>
   1527 <dt><tt>6</tt></dt>
   1528 <dd>Specifies a FIFO special file. Note that the archiving of a FIFO file archives the existence of this file and not its
   1529 contents.</dd>
   1530 <dt><tt>7</tt></dt>
   1531 <dd>Reserved to represent a file to which an implementation has associated some high-performance attribute. Implementations without
   1532 such extensions should treat this file as a regular file (type 0).</dd>
   1533 <dt><tt>A-Z</tt></dt>
   1534 <dd>The letters <tt>'A'</tt> to <tt>'Z'</tt>, inclusive, are reserved for custom implementations. All other values are reserved for
   1535 future versions of this standard.</dd>
   1536 </dl>
   1537 <p class="tent">It is unspecified whether files with pathnames that refer to the same directory entry are archived as linked files
   1538 or as separate files. If they are archived as linked files, this means that attempting to extract both pathnames from the resulting
   1539 archive always causes an error (unless the <b>-u</b> option is used) because the link cannot be created.</p>
   1540 <p class="tent">It is unspecified whether files with the same device and file serial numbers being appended to an archive are
   1541 treated as linked files to members that were in the archive before the append.</p>
   1542 <p class="tent">Attempts to archive a socket shall produce a diagnostic message when <b>ustar</b> interchange format is used, but
   1543 may be allowed when <b>pax</b> interchange format is used. Handling of other file types is implementation-defined.</p>
   1544 <p class="tent">The <i>magic</i> field is the specification that this archive was output in this archive format. If this field
   1545 contains <b>ustar</b> (the five characters from the ISO/IEC&nbsp;646:1991 standard IRV shown followed by NUL), the <i>uname</i> and
   1546 <i>gname</i> fields shall contain the ISO/IEC&nbsp;646:1991 standard IRV representation of the owner and group of the file,
   1547 respectively (truncated to fit, if necessary). When the file is restored by a privileged, protection-preserving version of the
   1548 utility, the user and group databases shall be scanned for these names. If found, the user and group IDs contained within these
   1549 files shall be used rather than the values contained within the <i>uid</i> and <i>gid</i> fields.</p>
   1550 <h5><a name="tag_20_94_13_07" id="tag_20_94_13_07"></a>cpio Interchange Format</h5>
   1551 <p class="tent">The octet-oriented <b>cpio</b> archive format shall be a series of entries, each comprising a header that describes
   1552 the file, the name of the file, and then the contents of the file.</p>
   1553 <p class="tent">An archive may be recorded as a series of fixed-size blocks of octets. This blocking shall be used only to make
   1554 physical I/O more efficient. The last group of blocks shall always be at the full size.</p>
   1555 <p class="tent">For the octet-oriented <b>cpio</b> archive format, the individual entry information shall be in the order indicated
   1556 and described by the following table; see also the <a href="../basedefs/cpio.h.html"><i>&lt;cpio.h&gt;</i></a> header.<br></p>
   1557 <p class="caption"><a name="tagtcjh_22" id="tagtcjh_22"></a> Table: Octet-Oriented cpio Archive Entry</p>
   1558 <center>
   1559 <table border="1" cellpadding="3" align="center">
   1560 <tr valign="top">
   1561 <th align="center">
   1562 <p class="tent"><b>Header Field Name</b></p>
   1563 </th>
   1564 <th align="center">
   1565 <p class="tent"><b>Length (in Octets)</b></p>
   1566 </th>
   1567 <th align="center">
   1568 <p class="tent"><b>Interpreted as</b></p>
   1569 </th>
   1570 </tr>
   1571 <tr valign="top">
   1572 <td align="left">
   1573 <p class="tent"><i>c_magic</i></p>
   1574 </td>
   1575 <td align="left">
   1576 <p class="tent">6</p>
   1577 </td>
   1578 <td align="left">
   1579 <p class="tent">Octal number</p>
   1580 </td>
   1581 </tr>
   1582 <tr valign="top">
   1583 <td align="left">
   1584 <p class="tent"><i>c_dev</i></p>
   1585 </td>
   1586 <td align="left">
   1587 <p class="tent">6</p>
   1588 </td>
   1589 <td align="left">
   1590 <p class="tent">Octal number</p>
   1591 </td>
   1592 </tr>
   1593 <tr valign="top">
   1594 <td align="left">
   1595 <p class="tent"><i>c_ino</i></p>
   1596 </td>
   1597 <td align="left">
   1598 <p class="tent">6</p>
   1599 </td>
   1600 <td align="left">
   1601 <p class="tent">Octal number</p>
   1602 </td>
   1603 </tr>
   1604 <tr valign="top">
   1605 <td align="left">
   1606 <p class="tent"><i>c_mode</i></p>
   1607 </td>
   1608 <td align="left">
   1609 <p class="tent">6</p>
   1610 </td>
   1611 <td align="left">
   1612 <p class="tent">Octal number</p>
   1613 </td>
   1614 </tr>
   1615 <tr valign="top">
   1616 <td align="left">
   1617 <p class="tent"><i>c_uid</i></p>
   1618 </td>
   1619 <td align="left">
   1620 <p class="tent">6</p>
   1621 </td>
   1622 <td align="left">
   1623 <p class="tent">Octal number</p>
   1624 </td>
   1625 </tr>
   1626 <tr valign="top">
   1627 <td align="left">
   1628 <p class="tent"><i>c_gid</i></p>
   1629 </td>
   1630 <td align="left">
   1631 <p class="tent">6</p>
   1632 </td>
   1633 <td align="left">
   1634 <p class="tent">Octal number</p>
   1635 </td>
   1636 </tr>
   1637 <tr valign="top">
   1638 <td align="left">
   1639 <p class="tent"><i>c_nlink</i></p>
   1640 </td>
   1641 <td align="left">
   1642 <p class="tent">6</p>
   1643 </td>
   1644 <td align="left">
   1645 <p class="tent">Octal number</p>
   1646 </td>
   1647 </tr>
   1648 <tr valign="top">
   1649 <td align="left">
   1650 <p class="tent"><i>c_rdev</i></p>
   1651 </td>
   1652 <td align="left">
   1653 <p class="tent">6</p>
   1654 </td>
   1655 <td align="left">
   1656 <p class="tent">Octal number</p>
   1657 </td>
   1658 </tr>
   1659 <tr valign="top">
   1660 <td align="left">
   1661 <p class="tent"><i>c_mtime</i></p>
   1662 </td>
   1663 <td align="left">
   1664 <p class="tent">11</p>
   1665 </td>
   1666 <td align="left">
   1667 <p class="tent">Octal number</p>
   1668 </td>
   1669 </tr>
   1670 <tr valign="top">
   1671 <td align="left">
   1672 <p class="tent"><i>c_namesize</i></p>
   1673 </td>
   1674 <td align="left">
   1675 <p class="tent">6</p>
   1676 </td>
   1677 <td align="left">
   1678 <p class="tent">Octal number</p>
   1679 </td>
   1680 </tr>
   1681 <tr valign="top">
   1682 <td align="left">
   1683 <p class="tent"><i>c_filesize</i></p>
   1684 </td>
   1685 <td align="left">
   1686 <p class="tent">11</p>
   1687 </td>
   1688 <td align="left">
   1689 <p class="tent">Octal number</p>
   1690 </td>
   1691 </tr>
   1692 <tr valign="top">
   1693 <th align="center">
   1694 <p class="tent"><b>Filename Field Name</b></p>
   1695 </th>
   1696 <th align="center">
   1697 <p class="tent"><b>Length</b></p>
   1698 </th>
   1699 <th align="center">
   1700 <p class="tent"><b>Interpreted as</b></p>
   1701 </th>
   1702 </tr>
   1703 <tr valign="top">
   1704 <td align="left">
   1705 <p class="tent"><i>c_name</i></p>
   1706 </td>
   1707 <td align="left">
   1708 <p class="tent"><i>c_namesize</i></p>
   1709 </td>
   1710 <td align="left">
   1711 <p class="tent">Pathname string</p>
   1712 </td>
   1713 </tr>
   1714 <tr valign="top">
   1715 <th align="center">
   1716 <p class="tent"><b>File Data Field Name</b></p>
   1717 </th>
   1718 <th align="center">
   1719 <p class="tent"><b>Length</b></p>
   1720 </th>
   1721 <th align="center">
   1722 <p class="tent"><b>Interpreted as</b></p>
   1723 </th>
   1724 </tr>
   1725 <tr valign="top">
   1726 <td align="left">
   1727 <p class="tent"><i>c_filedata</i></p>
   1728 </td>
   1729 <td align="left">
   1730 <p class="tent"><i>c_filesize</i></p>
   1731 </td>
   1732 <td align="left">
   1733 <p class="tent">Data</p>
   1734 </td>
   1735 </tr>
   1736 </table>
   1737 </center>
   1738 <h5><a name="tag_20_94_13_08" id="tag_20_94_13_08"></a>cpio Header</h5>
   1739 <p class="tent">For each file in the archive, a header as defined previously shall be written. The information in the header fields
   1740 is written as streams of the ISO/IEC&nbsp;646:1991 standard characters interpreted as octal numbers. The octal numbers shall be
   1741 extended to the necessary length by appending the ISO/IEC&nbsp;646:1991 standard IRV zeros at the most-significant-digit end of the
   1742 number; the result is written to the most-significant digit of the stream of octets first. The fields shall be interpreted as
   1743 follows:</p>
   1744 <dl compact>
   1745 <dd></dd>
   1746 <dt><i>c_magic</i></dt>
   1747 <dd>Identify the archive as being a transportable archive by containing the identifying value <tt>"070707"</tt>.</dd>
   1748 <dt><i>c_dev</i>,&nbsp;<i>c_ino</i></dt>
   1749 <dd>Contains values that uniquely identify the file within the archive (that is, no files contain the same pair of <i>c_dev</i> and
   1750 <i>c_ino</i> values unless they are links to the same file). The values shall be determined in an unspecified manner.</dd>
   1751 <dt><i>c_mode</i></dt>
   1752 <dd>Contains the file type and access permissions as defined in the following table.<br>
   1753 <p class="caption"><a name="tagtcjh_23" id="tagtcjh_23"></a> Table: Values for cpio c_mode Field</p>
   1754 <center>
   1755 <table border="1" cellpadding="3" align="center">
   1756 <tr valign="top">
   1757 <th align="center">
   1758 <p class="tent"><b>File Permissions Name</b></p>
   1759 </th>
   1760 <th align="center">
   1761 <p class="tent"><b>Value</b></p>
   1762 </th>
   1763 <th align="center">
   1764 <p class="tent"><b>Indicates</b></p>
   1765 </th>
   1766 </tr>
   1767 <tr valign="top">
   1768 <td align="left">
   1769 <p class="tent">C_IRUSR</p>
   1770 </td>
   1771 <td align="left">
   1772 <p class="tent">000400</p>
   1773 </td>
   1774 <td align="left">
   1775 <p class="tent">Read by owner</p>
   1776 </td>
   1777 </tr>
   1778 <tr valign="top">
   1779 <td align="left">
   1780 <p class="tent">C_IWUSR</p>
   1781 </td>
   1782 <td align="left">
   1783 <p class="tent">000200</p>
   1784 </td>
   1785 <td align="left">
   1786 <p class="tent">Write by owner</p>
   1787 </td>
   1788 </tr>
   1789 <tr valign="top">
   1790 <td align="left">
   1791 <p class="tent">C_IXUSR</p>
   1792 </td>
   1793 <td align="left">
   1794 <p class="tent">000100</p>
   1795 </td>
   1796 <td align="left">
   1797 <p class="tent">Execute by owner</p>
   1798 </td>
   1799 </tr>
   1800 <tr valign="top">
   1801 <td align="left">
   1802 <p class="tent">C_IRGRP</p>
   1803 </td>
   1804 <td align="left">
   1805 <p class="tent">000040</p>
   1806 </td>
   1807 <td align="left">
   1808 <p class="tent">Read by group</p>
   1809 </td>
   1810 </tr>
   1811 <tr valign="top">
   1812 <td align="left">
   1813 <p class="tent">C_IWGRP</p>
   1814 </td>
   1815 <td align="left">
   1816 <p class="tent">000020</p>
   1817 </td>
   1818 <td align="left">
   1819 <p class="tent">Write by group</p>
   1820 </td>
   1821 </tr>
   1822 <tr valign="top">
   1823 <td align="left">
   1824 <p class="tent">C_IXGRP</p>
   1825 </td>
   1826 <td align="left">
   1827 <p class="tent">000010</p>
   1828 </td>
   1829 <td align="left">
   1830 <p class="tent">Execute by group</p>
   1831 </td>
   1832 </tr>
   1833 <tr valign="top">
   1834 <td align="left">
   1835 <p class="tent">C_IROTH</p>
   1836 </td>
   1837 <td align="left">
   1838 <p class="tent">000004</p>
   1839 </td>
   1840 <td align="left">
   1841 <p class="tent">Read by others</p>
   1842 </td>
   1843 </tr>
   1844 <tr valign="top">
   1845 <td align="left">
   1846 <p class="tent">C_IWOTH</p>
   1847 </td>
   1848 <td align="left">
   1849 <p class="tent">000002</p>
   1850 </td>
   1851 <td align="left">
   1852 <p class="tent">Write by others</p>
   1853 </td>
   1854 </tr>
   1855 <tr valign="top">
   1856 <td align="left">
   1857 <p class="tent">C_IXOTH</p>
   1858 </td>
   1859 <td align="left">
   1860 <p class="tent">000001</p>
   1861 </td>
   1862 <td align="left">
   1863 <p class="tent">Execute by others</p>
   1864 </td>
   1865 </tr>
   1866 <tr valign="top">
   1867 <td align="left">
   1868 <p class="tent">C_ISUID</p>
   1869 </td>
   1870 <td align="left">
   1871 <p class="tent">004000</p>
   1872 </td>
   1873 <td align="left">
   1874 <p class="tent">Set <i>uid</i></p>
   1875 </td>
   1876 </tr>
   1877 <tr valign="top">
   1878 <td align="left">
   1879 <p class="tent">C_ISGID</p>
   1880 </td>
   1881 <td align="left">
   1882 <p class="tent">002000</p>
   1883 </td>
   1884 <td align="left">
   1885 <p class="tent">Set <i>gid</i></p>
   1886 </td>
   1887 </tr>
   1888 <tr valign="top">
   1889 <td align="left">
   1890 <p class="tent">C_ISVTX</p>
   1891 </td>
   1892 <td align="left">
   1893 <p class="tent">001000</p>
   1894 </td>
   1895 <td align="left">
   1896 <p class="tent">Reserved</p>
   1897 </td>
   1898 </tr>
   1899 <tr valign="top">
   1900 <th align="center">
   1901 <p class="tent"><b>File Type Name</b></p>
   1902 </th>
   1903 <th align="center">
   1904 <p class="tent"><b>Value</b></p>
   1905 </th>
   1906 <th align="center">
   1907 <p class="tent"><b>Indicates</b></p>
   1908 </th>
   1909 </tr>
   1910 <tr valign="top">
   1911 <td align="left">
   1912 <p class="tent">C_ISDIR</p>
   1913 </td>
   1914 <td align="left">
   1915 <p class="tent">040000</p>
   1916 </td>
   1917 <td align="left">
   1918 <p class="tent">Directory</p>
   1919 </td>
   1920 </tr>
   1921 <tr valign="top">
   1922 <td align="left">
   1923 <p class="tent">C_ISFIFO</p>
   1924 </td>
   1925 <td align="left">
   1926 <p class="tent">010000</p>
   1927 </td>
   1928 <td align="left">
   1929 <p class="tent">FIFO</p>
   1930 </td>
   1931 </tr>
   1932 <tr valign="top">
   1933 <td align="left">
   1934 <p class="tent">C_ISREG</p>
   1935 </td>
   1936 <td align="left">
   1937 <p class="tent">0100000</p>
   1938 </td>
   1939 <td align="left">
   1940 <p class="tent">Regular file</p>
   1941 </td>
   1942 </tr>
   1943 <tr valign="top">
   1944 <td align="left">
   1945 <p class="tent">C_ISLNK</p>
   1946 </td>
   1947 <td align="left">
   1948 <p class="tent">0120000</p>
   1949 </td>
   1950 <td align="left">
   1951 <p class="tent">Symbolic link</p>
   1952 </td>
   1953 </tr>
   1954 <tr valign="top">
   1955 <td align="left">
   1956 <p class="tent">C_ISBLK</p>
   1957 </td>
   1958 <td align="left">
   1959 <p class="tent">060000</p>
   1960 </td>
   1961 <td align="left">
   1962 <p class="tent">Block special file</p>
   1963 </td>
   1964 </tr>
   1965 <tr valign="top">
   1966 <td align="left">
   1967 <p class="tent">C_ISCHR</p>
   1968 </td>
   1969 <td align="left">
   1970 <p class="tent">020000</p>
   1971 </td>
   1972 <td align="left">
   1973 <p class="tent">Character special file</p>
   1974 </td>
   1975 </tr>
   1976 <tr valign="top">
   1977 <td align="left">
   1978 <p class="tent">C_ISSOCK</p>
   1979 </td>
   1980 <td align="left">
   1981 <p class="tent">0140000</p>
   1982 </td>
   1983 <td align="left">
   1984 <p class="tent">Socket</p>
   1985 </td>
   1986 </tr>
   1987 <tr valign="top">
   1988 <td align="left">
   1989 <p class="tent">C_ISCTG</p>
   1990 </td>
   1991 <td align="left">
   1992 <p class="tent">0110000</p>
   1993 </td>
   1994 <td align="left">
   1995 <p class="tent">Reserved</p>
   1996 </td>
   1997 </tr>
   1998 </table>
   1999 </center>
   2000 <p class="tent">Directories, FIFOs, symbolic links, and regular files shall be supported on a system conforming to this volume of
   2001 POSIX.1-2024; additional values defined previously are reserved for compatibility with existing systems. Additional file types may
   2002 be supported; however, such files should not be written to archives intended to be transported to other systems.</p>
   2003 </dd>
   2004 <dt><i>c_uid</i></dt>
   2005 <dd>Contains the user ID of the owner.</dd>
   2006 <dt><i>c_gid</i></dt>
   2007 <dd>Contains the group ID of the group.</dd>
   2008 <dt><i>c_nlink</i></dt>
   2009 <dd>Contains a number greater than or equal to the number of links in the archive referencing the file. If the <b>-a</b> option is
   2010 used to append to a <i>cpio</i> archive, then the <i>pax</i> utility need not account for the files in the existing part of the
   2011 archive when calculating the <i>c_nlink</i> values for the appended part of the archive, and need not alter the <i>c_nlink</i>
   2012 values in the existing part of the archive if additional files with the same <i>c_dev</i> and <i>c_ino</i> values are appended to
   2013 the archive.</dd>
   2014 <dt><i>c_rdev</i></dt>
   2015 <dd>Contains implementation-defined information for character or block special files.</dd>
   2016 <dt><i>c_mtime</i></dt>
   2017 <dd>Contains the latest time of modification of the file at the time the archive was created.</dd>
   2018 <dt><i>c_namesize</i></dt>
   2019 <dd>Contains the length of the pathname, including the terminating NUL character.</dd>
   2020 <dt><i>c_filesize</i></dt>
   2021 <dd>Contains the length in octets of the data section following the header structure.</dd>
   2022 </dl>
   2023 <h5><a name="tag_20_94_13_09" id="tag_20_94_13_09"></a>cpio Filename</h5>
   2024 <p class="tent">The <i>c_name</i> field shall contain the pathname of the file. The length of this field in octets is the value of
   2025 <i>c_namesize</i>.</p>
   2026 <p class="tent">If a filename is found on the medium that would create an invalid pathname, it is implementation-defined whether
   2027 the data from the file is stored on the file hierarchy and under what name it is stored.</p>
   2028 <p class="tent">All characters shall be represented in the ISO/IEC&nbsp;646:1991 standard IRV. For maximum portability between
   2029 implementations, names should be selected from characters represented by the portable filename character set as octets with the
   2030 most significant bit zero. If an implementation supports the use of characters outside the portable filename character set in names
   2031 for files, users, and groups, one or more implementation-defined encodings of these characters shall be provided for interchange
   2032 purposes. However, the <i>pax</i> utility shall never create filenames on the local system that cannot be accessed via the
   2033 procedures described previously in this volume of POSIX.1-2024. If a filename is found on the medium that would create an invalid
   2034 filename, it is implementation-defined whether the data from the file is stored on the local file system and under what name it is
   2035 stored. The <i>pax</i> utility may choose to ignore these files as long as it produces an error indicating that the file is being
   2036 ignored.</p>
   2037 <h5><a name="tag_20_94_13_10" id="tag_20_94_13_10"></a>cpio File Data</h5>
   2038 <p class="tent">Following <i>c_name</i>, there shall be <i>c_filesize</i> octets of data. Interpretation of such data occurs in a
   2039 manner dependent on the file. For regular files, the data shall consist of the contents of the file. For symbolic links, the data
   2040 shall consist of the contents of the symbolic link. If <i>c_filesize</i> is zero, no data shall be contained in
   2041 <i>c_filedata</i>.</p>
   2042 <p class="tent">When restoring from an archive:</p>
   2043 <ul>
   2044 <li class="tent">If the user does not have appropriate privileges to create a file of the specified type, <i>pax</i> shall ignore
   2045 the entry and write an error message to standard error.</li>
   2046 <li class="tent">Only regular files and symbolic links have data to be restored. Presuming a regular file meets any selection
   2047 criteria that might be imposed on the format-reading utility by the user, such data shall be restored.</li>
   2048 <li class="tent">If a user does not have appropriate privileges to set a particular mode flag, the flag shall be ignored. Some of
   2049 the mode flags in the archive format are not mentioned elsewhere in this volume of POSIX.1-2024. If the implementation does not
   2050 support those flags, they may be ignored.</li>
   2051 </ul>
   2052 <h5><a name="tag_20_94_13_11" id="tag_20_94_13_11"></a>cpio Special Entries</h5>
   2053 <p class="tent">FIFO special files, directories, and the trailer shall be recorded with <i>c_filesize</i> equal to zero. Symbolic
   2054 links shall be recorded with <i>c_filesize</i> equal to the length of the contents of the symbolic link. For other special files,
   2055 <i>c_filesize</i> is unspecified by this volume of POSIX.1-2024. The header for the next file entry in the archive shall be written
   2056 directly after the last octet of the file entry preceding it. A header denoting the filename <b>TRAILER!!!</b> shall indicate the
   2057 end of the archive; the contents of octets in the last block of the archive following such a header are undefined.</p>
   2058 </blockquote>
   2059 <h4 class="mansect"><a name="tag_20_94_14" id="tag_20_94_14"></a>EXIT STATUS</h4>
   2060 <blockquote>
   2061 <p>The following exit values shall be returned:</p>
   2062 <dl compact>
   2063 <dd></dd>
   2064 <dt>&nbsp;0</dt>
   2065 <dd>All files were processed successfully.</dd>
   2066 <dt>&gt;0</dt>
   2067 <dd>An error occurred.</dd>
   2068 </dl>
   2069 </blockquote>
   2070 <h4 class="mansect"><a name="tag_20_94_15" id="tag_20_94_15"></a>CONSEQUENCES OF ERRORS</h4>
   2071 <blockquote>
   2072 <p>If <i>pax</i> cannot create a file or a link when reading an archive or cannot find a file when writing an archive, or cannot
   2073 preserve the user ID, group ID, or file mode when the <b>-p</b> option is specified, a diagnostic message shall be written to
   2074 standard error and a non-zero exit status shall be returned, but processing shall continue. In the case where <i>pax</i> cannot
   2075 create a hard link to a file, <i>pax</i> shall not, by default, create a second copy of the file.</p>
   2076 <p class="tent">If the extraction of a file from an archive is prematurely terminated by a signal or error, <i>pax</i> may have
   2077 only partially extracted the file or (if the <b>-n</b> option was not specified) may have extracted a file of the same name as that
   2078 specified by the user, but which is not the file the user wanted. Additionally, the file modes of extracted directories may have
   2079 additional bits from the S_IRWXU mask set as well as incorrect modification and access times.</p>
   2080 </blockquote>
   2081 <hr>
   2082 <div class="box"><em>The following sections are informative.</em></div>
   2083 <h4 class="mansect"><a name="tag_20_94_16" id="tag_20_94_16"></a>APPLICATION USAGE</h4>
   2084 <blockquote>
   2085 <p>Caution is advised when using the <b>-a</b> option to append to a <i>cpio</i> format archive. If any of the files being appended
   2086 happen to be given the same <i>c_dev</i> and <i>c_ino</i> values as a file in the existing part of the archive, then they may be
   2087 treated as links to that file on extraction. Thus, it is risky to use <b>-a</b> with <i>cpio</i> format except when it is done on
   2088 the same system that the original archive was created on, and with the same <i>pax</i> utility, and in the knowledge that there has
   2089 been little or no file system activity since the original archive was created that could lead to any of the files appended being
   2090 given the same <i>c_dev</i> and <i>c_ino</i> values as an unrelated file in the existing part of the archive. Also, when
   2091 (intentionally) appending additional links to a file in the existing part of the archive, the <i>c_nlink</i> values in the modified
   2092 archive can be smaller than the number of links to the file in the archive, which may mean that the links are not preserved on
   2093 extraction.</p>
   2094 <p class="tent">The <b>-p</b> (privileges) option was invented to reconcile differences between historical <i>tar</i> and
   2095 <i>cpio</i> implementations. In particular, the two utilities use <b>-m</b> in diametrically opposed ways. The <b>-p</b> option
   2096 also provides a consistent means of extending the ways in which future file attributes can be addressed, such as for enhanced
   2097 security systems or high-performance files. Although it may seem complex, there are really two modes that are most commonly
   2098 used:</p>
   2099 <dl compact>
   2100 <dd></dd>
   2101 <dt><b>-p&nbsp;e</b></dt>
   2102 <dd>&quot;Preserve everything&quot;. This would be used by the historical superuser, someone with all appropriate privileges, to preserve
   2103 all aspects of the files as they are recorded in the archive. The <b>e</b> flag is the sum of <b>o</b> and <b>p</b>, and other
   2104 implementation-defined attributes.</dd>
   2105 <dt><b>-p&nbsp;p</b></dt>
   2106 <dd>&quot;Preserve&quot; the file mode bits. This would be used by the user with regular privileges who wished to preserve aspects of the
   2107 file other than the ownership. The file times are preserved by default, but two other flags are offered to disable these and use
   2108 the time of extraction.</dd>
   2109 </dl>
   2110 <p class="tent">The one pathname per line format of standard input precludes pathnames containing &lt;newline&gt; characters.
   2111 Although such pathnames violate the portable filename guidelines, they may exist and their presence may inhibit usage of <i>pax</i>
   2112 within shell scripts. This problem is inherited from historical archive programs. The problem can be avoided by listing filename
   2113 arguments on the command line instead of on standard input.</p>
   2114 <p class="tent">It is almost certain that appropriate privileges are required for <i>pax</i> to accomplish parts of this volume of
   2115 POSIX.1-2024. Specifically, creating files of type block special or character special, restoring file access times unless the files
   2116 are owned by the user (the <b>-t</b> option), or preserving file owner, group, and mode (the <b>-p</b> option) all probably require
   2117 appropriate privileges.</p>
   2118 <p class="tent">In <b>read</b> mode, implementations are permitted to overwrite files when the archive has multiple members with
   2119 the same name. This may fail if permissions on the first version of the file do not permit it to be overwritten.</p>
   2120 <p class="tent">The <b>cpio</b> and <b>ustar</b> formats can only support files up to 8589934592 bytes (8 * 2^30) in size.</p>
   2121 <p class="tent">When archives containing binary header information are listed , the filenames printed may cause strange behavior on
   2122 some terminals.</p>
   2123 <p class="tent">When all of the following are true:</p>
   2124 <ol>
   2125 <li class="tent">A file of type directory is being placed into an archive.</li>
   2126 <li class="tent">The <b>ustar</b> archive format is being used.</li>
   2127 <li class="tent">The pathname of the directory is less than or equal to 155 bytes long (it will fit in the <i>prefix</i> field in
   2128 the <b>ustar</b> header block).</li>
   2129 <li class="tent">The last component of the pathname of the directory is longer than 100 bytes long (it will not fit in the
   2130 <i>name</i> field in the <b>ustar</b> header block).</li>
   2131 </ol>
   2132 <p class="tent">some implementations of the <i>pax</i> utility will place the entire directory pathname in the <i>prefix</i> field,
   2133 set the <i>name</i> field to an empty string, and place the directory in the archive. Other implementations of the <i>pax</i>
   2134 utility will give an error under these conditions because the <i>name</i> field is not large enough to hold the last component of
   2135 the directory name. This standard allows either behavior. However, when extracting a directory from a <b>ustar</b> format archive,
   2136 this standard requires that all implementations be able to extract a directory even if the <i>name</i> field contains an empty
   2137 string as long as the <i>prefix</i> field does not also contain an empty string.</p>
   2138 <p class="tent">When restricting file hierarchy traversal to one file system, it can sometimes be desirable for the crossing points
   2139 themselves to be processed (archived or copied) and sometimes for them not to be processed. (Crossing points are mount points and,
   2140 if the <b>-L</b> option is specified, symbolic links to directories on other file systems.) With the <b>-X</b> option <i>pax</i>
   2141 processes them, but there is no standard way to have <i>pax</i> not process them. However, this can be achieved by using <a href=
   2142 "../utilities/find.html"><i>find</i></a> to do the hierarchy traversal and piping the output of find to <i>pax</i> (with the
   2143 <b>-d</b> option); see the APPLICATION USAGE for <a href="../utilities/find.html#"><i>find</i></a> .</p>
   2144 </blockquote>
   2145 <h4 class="mansect"><a name="tag_20_94_17" id="tag_20_94_17"></a>EXAMPLES</h4>
   2146 <blockquote>
   2147 <p>The following command:</p>
   2148 <pre>
   2149 <tt>pax -w -f /dev/rmt/1m .
   2150 </tt></pre>
   2151 <p class="tent">copies the contents of the current directory to tape drive 1, medium density (assuming historical System V device
   2152 naming procedures—the historical BSD device name would be <b>/dev/rmt9</b>).</p>
   2153 <p class="tent">The following commands:</p>
   2154 <pre>
   2155 <tt>mkdir </tt><i>newdir</i><tt>
   2156 pax -rw </tt><i>olddir newdir</i><tt>
   2157 </tt></pre>
   2158 <p class="tent">copy the <i>olddir</i> directory hierarchy to <i>newdir</i>.</p>
   2159 <pre>
   2160 <tt>pax -r -s ',^//*usr//*,,' -f a.pax
   2161 </tt></pre>
   2162 <p class="tent">reads the archive <b>a.pax</b>, with all files rooted in <b>/usr</b> in the archive extracted relative to the
   2163 current directory.</p>
   2164 <p class="tent">Using the option:</p>
   2165 <pre>
   2166 <tt>-o listopt="%M %(atime)T %(size)D %(name)s"
   2167 </tt></pre>
   2168 <p class="tent">overrides the default output description in Standard Output and instead writes:</p>
   2169 <pre>
   2170 <tt>-rw-rw--- Jan 12 15:53 2003 1492 /usr/foo/bar
   2171 </tt></pre>
   2172 <p class="tent">Using the options:</p>
   2173 <pre>
   2174 <tt>-o listopt='%L\t%(size)D\n%.7' \
   2175 -o listopt='(name)s\n%(atime)T\n%T'
   2176 </tt></pre>
   2177 <p class="tent">overrides the default output description in Standard Output and instead writes:</p>
   2178 <pre>
   2179 <tt>/usr/foo/bar -&gt; /tmp   1492
   2180 /usr/fo
   2181 Jan 12 15:53 1991
   2182 Jan 31 15:53 2003
   2183 </tt></pre></blockquote>
   2184 <h4 class="mansect"><a name="tag_20_94_18" id="tag_20_94_18"></a>RATIONALE</h4>
   2185 <blockquote>
   2186 <p>The <i>pax</i> utility was new for the ISO&nbsp;POSIX-2:1993 standard. It represents a peaceful compromise between advocates of
   2187 the historical <i>tar</i> and <i>cpio</i> utilities.</p>
   2188 <p class="tent">A fundamental difference between <i>cpio</i> and <i>tar</i> was in the way directories were treated. The
   2189 <i>cpio</i> utility did not treat directories differently from other files, and to select a directory and its contents required
   2190 that each file in the hierarchy be explicitly specified. For <i>tar</i>, a directory matched every file in the file hierarchy it
   2191 rooted.</p>
   2192 <p class="tent">The <i>pax</i> utility offers both interfaces; by default, directories map into the file hierarchy they root. The
   2193 <b>-d</b> option causes <i>pax</i> to skip any file not explicitly referenced, as <i>cpio</i> historically did. The <i>tar</i>
   2194 <b>-</b><i>style</i> behavior was chosen as the default because it was believed that this was the more common usage and because
   2195 <i>tar</i> is the more commonly available interface, as it was historically provided on both System V and BSD implementations.</p>
   2196 <p class="tent">The data interchange format specification in this volume of POSIX.1-2024 requires that processes with &quot;appropriate
   2197 privileges&quot; shall always restore the ownership and permissions of extracted files exactly as archived. If viewed from the historic
   2198 equivalence between superuser and &quot;appropriate privileges&quot;, there are two problems with this requirement. First, users running as
   2199 superusers may unknowingly set dangerous permissions on extracted files. Second, it is needlessly limiting, in that superusers
   2200 cannot extract files and own them as superuser unless the archive was created by the superuser. (It should be noted that
   2201 restoration of ownerships and permissions for the superuser, by default, is historical practice in <i>cpio</i>, but not in
   2202 <i>tar</i>.) In order to avoid these two problems, the <i>pax</i> specification has an additional &quot;privilege&quot; mechanism, the
   2203 <b>-p</b> option. Only a <i>pax</i> invocation with the privileges needed, and which has the <b>-p</b> option set using the
   2204 <tt>e</tt> specification character, has appropriate privileges to restore full ownership and permission information.</p>
   2205 <p class="tent">Note also that this volume of POSIX.1-2024 requires that the file ownership and access permissions shall be set, on
   2206 extraction, in the same fashion as the <a href="../functions/creat.html"><i>creat</i>()</a> function when provided with the mode
   2207 stored in the archive. This means that the file creation mask of the user is applied to the file permissions.</p>
   2208 <p class="tent">Users should note that directories may be created by <i>pax</i> while extracting files with permissions that are
   2209 different from those that existed at the time the archive was created. When extracting sensitive information into a directory
   2210 hierarchy that no longer exists, users are encouraged to set their file creation mask appropriately to protect these files during
   2211 extraction.</p>
   2212 <p class="tent">The table of contents output is written to standard output to facilitate pipeline processing.</p>
   2213 <p class="tent">An early proposal had hard links displaying for all pathnames. This was removed because it complicates the output
   2214 of the case where <b>-v</b> is not specified and does not match historical <i>cpio</i> usage. The hard-link information is
   2215 available in the <b>-v</b> display.</p>
   2216 <p class="tent">The description of the <b>-l</b> option allows implementations to make hard links to symbolic links. Earlier
   2217 versions of this standard did not specify any way to create a hard link to a symbolic link, but many implementations provided this
   2218 capability as an extension. If there are hard links to symbolic links when an archive is created, the implementation is required to
   2219 archive the hard link in the archive (unless <b>-H</b> or <b>-L</b> is specified). When in <b>read</b> mode and in <b>copy</b>
   2220 mode, implementations supporting hard links to symbolic links should use them when appropriate.</p>
   2221 <p class="tent">The archive formats inherited from the POSIX.1-1990 standard have certain restrictions that have been brought along
   2222 from historical usage. For example, there are restrictions on the length of pathnames stored in the archive. When <i>pax</i> is
   2223 used in <b>copy</b>(<b>-rw</b>) mode (copying directory hierarchies), the ability to use extensions from the <b>-x</b><b>pax</b>
   2224 format overcomes these restrictions.</p>
   2225 <p class="tent">The default <i>blocksize</i> value of 5120 bytes for <i>cpio</i> was selected because it is one of the standard
   2226 block-size values for <i>cpio</i>, set when the <b>-B</b> option is specified. (The other default block-size value for <i>cpio</i>
   2227 is 512 bytes, and this was considered to be too small.) The default block value of 10240 bytes for <i>tar</i> was selected because
   2228 that is the standard block-size value for BSD <i>tar</i>. The maximum block size of 32256 bytes (2<small><sup>15</sup></small>-512
   2229 bytes) is the largest multiple of 512 bytes that fits into a signed 16-bit tape controller transfer register. There are known
   2230 limitations in some historical systems that would prevent larger blocks from being accepted. Historical values were chosen to
   2231 improve compatibility with historical scripts using <a href="../utilities/dd.html"><i>dd</i></a> or similar utilities to manipulate
   2232 archives. Also, default block sizes for any file type other than character special file has been deleted from this volume of
   2233 POSIX.1-2024 as unimportant and not likely to affect the structure of the resulting archive.</p>
   2234 <p class="tent">Implementations are permitted to modify the block-size value based on the archive format or the device to which the
   2235 archive is being written. This is to provide implementations with the opportunity to take advantage of special types of devices,
   2236 and it should not be used without a great deal of consideration as it almost certainly decreases archive portability.</p>
   2237 <p class="tent">The intended use of the <b>-n</b> option was to permit extraction of one or more files from the archive without
   2238 processing the entire archive. This was viewed by the standard developers as offering significant performance advantages over
   2239 historical implementations. The <b>-n</b> option in early proposals had three effects; the first was to cause special characters in
   2240 patterns to not be treated specially. The second was to cause only the first file that matched a pattern to be extracted. The third
   2241 was to cause <i>pax</i> to write a diagnostic message to standard error when no file was found matching a specified pattern. Only
   2242 the second behavior is retained by this volume of POSIX.1-2024, for many reasons. First, it is in general not acceptable for a
   2243 single option to have multiple effects. Second, the ability to make pattern matching characters act as normal characters is useful
   2244 for parts of <i>pax</i> other than file extraction. Third, a finer degree of control over the special characters is useful because
   2245 users may wish to normalize only a single special character in a single filename. Fourth, given a more general escape mechanism,
   2246 the previous behavior of the <b>-n</b> option can be easily obtained using the <b>-s</b> option or a <a href=
   2247 "../utilities/sed.html"><i>sed</i></a> script. Finally, writing a diagnostic message when a pattern specified by the user is
   2248 unmatched by any file is useful behavior in all cases.</p>
   2249 <p class="tent">In this version, the <b>-n</b> was removed from the <b>copy</b> mode synopsis of <i>pax</i>; it is inapplicable
   2250 because there are no pattern operands specified in this mode.</p>
   2251 <p class="tent">There is another method than <i>pax</i> for copying subtrees in POSIX.1-2024 described as part of the <a href=
   2252 "../utilities/cp.html"><i>cp</i></a> utility. Both methods are historical practice: <a href="../utilities/cp.html"><i>cp</i></a>
   2253 provides a simpler, more intuitive interface, while <i>pax</i> offers a finer granularity of control. Each provides additional
   2254 functionality to the other; in particular, <i>pax</i> maintains the hard-link structure of the hierarchy while <a href=
   2255 "../utilities/cp.html"><i>cp</i></a> does not. It is the intention of the standard developers that the results be similar (using
   2256 appropriate option combinations in both utilities). The results are not required to be identical; there seemed insufficient gain to
   2257 applications to balance the difficulty of implementations having to guarantee that the results would be exactly identical.</p>
   2258 <p class="tent">A single archive may span more than one file. It is suggested that implementations provide informative messages to
   2259 the user on standard error whenever the archive file is changed.</p>
   2260 <p class="tent">The <b>-d</b> option (do not create intermediate directories not listed in the archive) found in early proposals
   2261 was originally provided as a complement to the historic <b>-d</b> option of <i>cpio</i>. It has been deleted.</p>
   2262 <p class="tent">The <b>-s</b> option in early proposals specified a subset of the substitution command from the <a href=
   2263 "../utilities/ed.html"><i>ed</i></a> utility. As there was no reason for only a subset to be supported, the <b>-s</b> option is now
   2264 compatible with the current <a href="../utilities/ed.html"><i>ed</i></a> specification. Since the delimiter can be any non-null
   2265 character, the following usage with single &lt;space&gt; characters is valid:</p>
   2266 <pre>
   2267 <tt>pax -s " foo bar " ...
   2268 </tt></pre>
   2269 <p class="tent">The <b>-t</b> description is worded so as to note that this may cause the access time update caused by some other
   2270 activity (which occurs while the file is being read) to be overwritten.</p>
   2271 <p class="tent">The default behavior of <i>pax</i> with regard to file modification times is the same as historical implementations
   2272 of <i>tar</i>. It is not the historical behavior of <i>cpio</i>.</p>
   2273 <p class="tent">Because the <b>-i</b> option uses <b>/dev/tty</b>, utilities without a controlling terminal are not able to use
   2274 this option.</p>
   2275 <p class="tent">The <b>-y</b> option, found in early proposals, has been deleted because a line containing a single &lt;period&gt;
   2276 for the <b>-i</b> option has equivalent functionality. The special lines for the <b>-i</b> option (a single &lt;period&gt; and the
   2277 empty line) are historical practice in <i>cpio</i>.</p>
   2278 <p class="tent">In early drafts, a <b>-e</b><i>charmap</i> option was included to increase portability of files between systems
   2279 using different coded character sets. This option was omitted because it was apparent that consensus could not be formed for it. In
   2280 this version, the use of UTF-8 should be an adequate substitute.</p>
   2281 <p class="tent">The ISO&nbsp;POSIX-2:1993 standard and ISO&nbsp;POSIX-1 standard requirements for <i>pax</i>, however, made it very
   2282 difficult to create a single archive containing files created using extended characters provided by different locales. This version
   2283 adds the <b>hdrcharset</b> keyword to make it possible to archive files in these cases without dropping files due to translation
   2284 errors.</p>
   2285 <p class="tent">Translating filenames and other attributes from a locale's encoding to UTF-8 and then back again can lose
   2286 information, as the resulting filename might not be byte-for-byte equivalent to the original. To avoid this problem, users can
   2287 specify the <b>-o</b> <b>hdrcharset=binary</b> option, which will cause the resulting archive to use binary format for all names
   2288 and attributes. Such archives are not portable among hosts that use different native encodings (e.g., EBCDIC <i>versus</i>
   2289 ASCII-based encodings), but they will allow interchange among the vast majority of POSIX file systems in practical use. Also, the
   2290 <b>-o</b> <b>hdrcharset=binary</b> option will cause <i>pax</i> in <b>copy</b> mode to behave more like other standard utilities
   2291 such as <a href="../utilities/cp.html"><i>cp</i></a>.</p>
   2292 <p class="tent">If the values specified by the <b>-o</b> <b>exthdr.name=value</b>, <b>-o</b> <b>globexthdr.name=value</b>, or by
   2293 <b>$TMPDIR</b> (if <b>-o</b> <b>globexthdr.name</b> is not specified) require a character encoding other than that described in the
   2294 ISO/IEC&nbsp;646:1991 standard, a <b>path</b> extended header record will have to be created for the file. If a <b>hdrcharset</b>
   2295 extended header record is active for such headers, it will determine the codeset used for the value field in these extended
   2296 <b>path</b> header records. These <b>path</b> extended header records always need to be created when writing an archive even if
   2297 <b>hdrcharset=binary</b> has been specified and would contain the same (binary) data that appears in the <b>ustar</b> header record
   2298 prefix and <i>name</i> fields. (In other words, an extended header <b>path</b> record is always required to be generated if the
   2299 <i>prefix</i> or <i>name</i> fields contain non-ASCII characters even when <b>hdrcharset=binary</b> is also in effect for that
   2300 file.)</p>
   2301 <p class="tent">The <b>-k</b> option was added to address international concerns about the dangers involved in the character set
   2302 transformations of <b>-e</b> (if the target character set were different from the source, the filenames might be transformed into
   2303 names matching existing files) and also was made more general to protect files transferred between file systems with different
   2304 {NAME_MAX} values (truncating a filename on a smaller system might also inadvertently overwrite existing files). As stated, it
   2305 prevents any overwriting, even if the target file is older than the source. This version adds more granularity of options to solve
   2306 this problem by introducing the <b>-o</b><b>invalid=option</b>—specifically the <b>UTF-8</b> and <b>binary</b> actions. (Note that
   2307 an existing file is still subject to overwriting in this case. The <b>-k</b> option closes that loophole.)</p>
   2308 <p class="tent">Some of the file characteristics referenced in this volume of POSIX.1-2024 might not be supported by some archive
   2309 formats. For example, neither the <b>tar</b> nor <b>cpio</b> formats contain the file access time. For this reason, the <tt>e</tt>
   2310 specification character has been provided, intended to cause all file characteristics specified in the archive to be retained.</p>
   2311 <p class="tent">It is required that extracted directories, by default, have their access and modification times and permissions set
   2312 to the values specified in the archive. This has obvious problems in that the directories are almost certainly modified after being
   2313 extracted and that directory permissions may not permit file creation. One possible solution is to create directories with the mode
   2314 specified in the archive, as modified by the <a href="../utilities/umask.html"><i>umask</i></a> of the user, with sufficient
   2315 permissions to allow file creation. After all files have been extracted, <i>pax</i> would then reset the access and modification
   2316 times and permissions as necessary.</p>
   2317 <p class="tent">The list-mode formatting description borrows heavily from the one defined by the <a href=
   2318 "../utilities/printf.html"><i>printf</i></a> utility. However, since there is no separate operand list to get conversion arguments,
   2319 the format was extended to allow specifying the name of the conversion argument as part of the conversion specification.</p>
   2320 <p class="tent">The <tt>T</tt> conversion specifier allows time fields to be displayed in any of the date formats. Unlike the
   2321 <a href="../utilities/ls.html"><i>ls</i></a> utility, <i>pax</i> does not adjust the format when the date is less than six months
   2322 in the past. This makes parsing the output more predictable.</p>
   2323 <p class="tent">The <tt>D</tt> conversion specifier handles the ability to display the major/minor or file size, as with <a href=
   2324 "../utilities/ls.html"><i>ls</i></a>, by using <tt>%-8(</tt><i>size</i><tt>)D</tt>.</p>
   2325 <p class="tent">The <tt>L</tt> conversion specifier handles the <a href="../utilities/ls.html"><i>ls</i></a> display for symbolic
   2326 links.</p>
   2327 <p class="tent">Conversion specifiers were added to generate existing known types used for <a href=
   2328 "../utilities/ls.html"><i>ls</i></a>.</p>
   2329 <h5><a name="tag_20_94_18_01" id="tag_20_94_18_01"></a>pax Interchange Format</h5>
   2330 <p class="tent">The new POSIX data interchange format was developed primarily to satisfy international concerns that the
   2331 <b>ustar</b> and <b>cpio</b> formats did not provide for file, user, and group names encoded in characters outside a subset of the
   2332 ISO/IEC&nbsp;646:1991 standard. The standard developers realized that this new POSIX data interchange format should be very
   2333 extensible because there were other requirements they foresaw in the near future:</p>
   2334 <ul>
   2335 <li class="tent">Support international character encodings and locale information</li>
   2336 <li class="tent">Support security information (ACLs, and so on)</li>
   2337 <li class="tent">Support future file types, such as realtime or contiguous files</li>
   2338 <li class="tent">Include data areas for implementation use</li>
   2339 <li class="tent">Support systems with words larger than 32 bits and timers with subsecond granularity</li>
   2340 </ul>
   2341 <p class="tent">The following were not goals for this format because these are better handled by separate utilities or are
   2342 inappropriate for a portable format:</p>
   2343 <ul>
   2344 <li class="tent">Encryption</li>
   2345 <li class="tent">Compression</li>
   2346 <li class="tent">Data translation between locales and codesets</li>
   2347 <li class="tent"><i>inode</i> storage</li>
   2348 </ul>
   2349 <p class="tent">The format chosen to support the goals is an extension of the <b>ustar</b> format. Of the two formats previously
   2350 available, only the <b>ustar</b> format was selected for extensions because:</p>
   2351 <ul>
   2352 <li class="tent">It was easier to extend in an upwards-compatible way. It offered version flags and header block type fields with
   2353 room for future standardization. The <b>cpio</b> format, while possessing a more flexible file naming methodology, could not be
   2354 extended without breaking some theoretical implementation or using a dummy filename that could be a legitimate filename.</li>
   2355 <li class="tent">Industry experience since the original &quot;<i>tar</i> wars&quot; fought in developing the ISO&nbsp;POSIX-1 standard has
   2356 clearly been in favor of the <b>ustar</b> format, which is generally the default output format selected for <i>pax</i>
   2357 implementations on new systems.</li>
   2358 </ul>
   2359 <p class="tent">The new format was designed with one additional goal in mind: reasonable behavior when an older <i>tar</i> or
   2360 <i>pax</i> utility happened to read an archive. Since the POSIX.1-1990 standard mandated that a &quot;format-reading utility&quot; had to
   2361 treat unrecognized <i>typeflag</i> values as regular files, this allowed the format to include all the extended information in a
   2362 pseudo-regular file that preceded each real file. An option is given that allows the archive creator to set up reasonable names for
   2363 these files on the older systems. Also, the normative text suggests that reasonable file access values be used for this
   2364 <b>ustar</b> header block. Making these header files inaccessible for convenient reading and deleting would not be reasonable. File
   2365 permissions of 600 or 700 are suggested.</p>
   2366 <p class="tent">The <b>ustar</b> <i>typeflag</i> field was used to accommodate the additional functionality of the new format
   2367 rather than magic or version because the POSIX.1-1990 standard (and, by reference, the previous version of <i>pax</i>), mandated
   2368 the behavior of the format-reading utility when it encountered an unknown <i>typeflag</i>, but was silent about the other two
   2369 fields.</p>
   2370 <p class="tent">Early proposals for the first version of this standard contained a proposed archive format that was based on
   2371 compatibility with the standard for tape files (ISO&nbsp;1001, similar to the format used historically on many mainframes and
   2372 minicomputers). This format was overly complex and required considerable overhead in volume and header records. Furthermore, the
   2373 standard developers felt that it would not be acceptable to the community of POSIX developers, so it was later changed to be a
   2374 format more closely related to historical practice on POSIX systems.</p>
   2375 <p class="tent">The prefix and name split of pathnames in <b>ustar</b> was replaced by the single path extended header record for
   2376 simplicity.</p>
   2377 <p class="tent">The concept of a global extended header (<i>typeflag</i><b>g</b>) was controversial. If this were applied to an
   2378 archive being recorded on magnetic tape, a few unreadable blocks at the beginning of the tape could be a serious problem; a utility
   2379 attempting to extract as many files as possible from a damaged archive could lose a large percentage of file header information in
   2380 this case. However, if the archive were on a reliable medium, such as a CD-ROM, the global extended header offers considerable
   2381 potential size reductions by eliminating redundant information. Thus, the text warns against using the global method for unreliable
   2382 media and provides a method for implanting global information in the extended header for each file, rather than in the
   2383 <i>typeflag</i> <b>g</b> records.</p>
   2384 <p class="tent">No facility for data translation or filtering on a per-file basis is included because the standard developers could
   2385 not invent an interface that would allow this in an efficient manner. If a filter, such as encryption or compression, is to be
   2386 applied to all the files, it is more efficient to apply the filter to the entire archive as a single file. The standard developers
   2387 considered interfaces that would invoke a shell script for each file going into or out of the archive, but the system overhead in
   2388 this approach was considered to be too high.</p>
   2389 <p class="tent">One such approach would be to have <b>filter=</b> records that give a pathname for an executable. When the program
   2390 is invoked, the file and archive would be open for standard input/output and all the header fields would be available as
   2391 environment variables or command-line arguments. The standard developers did discuss such schemes, but they were omitted from
   2392 POSIX.1-2024 due to concerns about excessive overhead. Also, the program itself would need to be in the archive if it were to be
   2393 used portably.</p>
   2394 <p class="tent">There is currently no portable means of identifying the character set(s) used for a file in the file system.
   2395 Therefore, <i>pax</i> has not been given a mechanism to generate charset records automatically. The only portable means of doing
   2396 this is for the user to write the archive using the <b>-o</b><b>charset=string</b> command line option. This assumes that all of
   2397 the files in the archive use the same encoding. The &quot;implementation-defined&quot; text is included to allow for a system that can
   2398 identify the encodings used for each of its files.</p>
   2399 <p class="tent">The table of standards that accompanies the charset record description is acknowledged to be very limited. Only a
   2400 limited number of character set standards is reasonable for maximal interchange. Any character set is, of course, possible by prior
   2401 agreement. It was suggested that EBCDIC be listed, but it was omitted because it is not defined by a formal standard. Formal
   2402 standards, and then only those with reasonably large followings, can be included here, simply as a matter of practicality. The
   2403 &lt;<i>value</i>&gt;s represent names of officially registered character sets in the format required by the ISO&nbsp;2375:1985
   2404 standard.</p>
   2405 <p class="tent">The normal &lt;comma&gt; or &lt;blank&gt;-separated list rules are not followed in the case of keyword options to
   2406 allow ease of argument parsing for <a href="../utilities/getopts.html"><i>getopts</i></a>.</p>
   2407 <p class="tent">Further information on character encodings is in <a href="#tag_20_94_18_02">pax Archive Character Set
   2408 Encoding/Decoding</a> .</p>
   2409 <p class="tent">The standard developers have reserved keyword name space for vendor extensions. It is suggested that the format to
   2410 be used is:</p>
   2411 <pre>
   2412 <i>VENDOR.keyword</i>
   2413 </pre>
   2414 <p class="tent">where <i>VENDOR</i> is the name of the vendor or organization in all uppercase letters. It is further suggested
   2415 that the keyword following the &lt;period&gt; be named differently than any of the standard keywords so that it could be used for
   2416 future standardization, if appropriate, by omitting the <i>VENDOR</i> prefix.</p>
   2417 <p class="tent">The &lt;<i>length</i>&gt; field in the extended header record was included to make it simpler to step through the
   2418 records, even if a record contains an unknown format (to a particular <i>pax</i>) with complex interactions of special characters.
   2419 It also provides a minor integrity checkpoint within the records to aid a program attempting to recover files from a damaged
   2420 archive.</p>
   2421 <p class="tent">There are no extended header versions of the <i>devmajor</i> and <i>devminor</i> fields because the unspecified
   2422 format <b>ustar</b> header field should be sufficient. If they are not, vendor-specific extended keywords (such as
   2423 <i>VENDOR.devmajor</i>) should be used.</p>
   2424 <p class="tent">Device and <i>i</i>-number labeling of files was not adopted from <i>cpio</i>; files are interchanged strictly on a
   2425 symbolic name basis, as in <b>ustar</b>.</p>
   2426 <p class="tent">Just as with the <b>ustar</b> format descriptions, the new format makes no special arrangements for multi-volume
   2427 archives. Each of the <i>pax</i> archive types is assumed to be inside a single POSIX file and splitting that file over multiple
   2428 volumes (diskettes, tape cartridges, and so on), processing their labels, and mounting each in the proper sequence are considered
   2429 to be implementation details that cannot be described portably.</p>
   2430 <p class="tent">The <b>pax</b> format is intended for interchange, not only for backup on a single (family of) systems. It is not
   2431 as densely packed as might be possible for backup:</p>
   2432 <ul>
   2433 <li class="tent">It contains information as coded characters that could be coded in binary.</li>
   2434 <li class="tent">It identifies extended records with name fields that could be omitted in favor of a fixed-field layout.</li>
   2435 <li class="tent">It translates names into a portable character set and identifies locale-related information, both of which are
   2436 probably unnecessary for backup.</li>
   2437 </ul>
   2438 <p class="tent">The requirements on restoring from an archive are slightly different from the historical wording, allowing for
   2439 non-monolithic privilege to bring forward as much as possible. In particular, attributes such as &quot;high performance file&quot; might be
   2440 broadly but not universally granted while set-user-ID or <a href="../functions/chown.html"><i>chown</i>()</a> might be much more
   2441 restricted. There is no implication in POSIX.1-2024 that the security information be honored after it is restored to the file
   2442 hierarchy, in spite of what might be improperly inferred by the silence on that topic. That is a topic for another standard.</p>
   2443 <p class="tent">Hard links are recorded in the fashion described here because a hard link can be to any file type. It is desirable
   2444 in general to be able to restore part of an archive selectively and restore all of those files completely. If the data is not
   2445 associated with each hard link, it is not possible to do this. However, the data associated with a file can be large, and when
   2446 selective restoration is not needed, this can be a significant burden. The archive is structured so that files that have no
   2447 associated data can always be restored by the name of any link name of any hard link, and the user can choose whether data is
   2448 recorded with each instance of a file that contains data. The format permits mixing of hard links with data and hard links without
   2449 data in a single archive; this can be done for special needs, and <i>pax</i> is expected to interpret such archives on input
   2450 properly, despite the fact that there is no <i>pax</i> option that would force this mixed case on output. (When <b>-o</b>
   2451 <b>linkdata</b> is used, the output must contain the duplicate data, but the implementation is free to include it or omit it when
   2452 <b>-o</b> <b>linkdata</b> is not used.)</p>
   2453 <p class="tent">The time values are included as extended header records for those implementations needing more than the eleven
   2454 octal digits allowed by the <b>ustar</b> format. Portable file timestamps cannot be negative. If <i>pax</i> encounters a file with
   2455 a negative timestamp in <b>copy</b> or <b>write</b> mode, it can reject the file, substitute a non-negative timestamp, or generate
   2456 a non-portable timestamp with a leading <tt>'-'</tt>. Even though some implementations can support finer file-time granularities
   2457 than seconds, the normative text requires support only for seconds since the Epoch because the ISO&nbsp;POSIX-1 standard states
   2458 them that way. The <b>ustar</b> format includes only <i>mtime</i>; the new format adds <i>atime</i> and <i>ctime</i> for symmetry.
   2459 The <i>atime</i> access time restored to the file system will be affected by the <b>-p</b> <b>a</b> and <b>-p</b> <b>e</b> options.
   2460 The <i>ctime</i> creation time (actually <i>inode</i> modification time) is described with appropriate privileges so that it can be
   2461 ignored when writing to the file system. POSIX does not provide a portable means to change file creation time. Nothing is intended
   2462 to prevent a non-portable implementation of <i>pax</i> from restoring the value.</p>
   2463 <p class="tent">The <i>gid</i>, <i>size</i>, and <i>uid</i> extended header records were included to allow expansion beyond the
   2464 sizes specified in the regular <i>tar</i> header. New file system architectures are emerging that will exhaust the 12-digit size
   2465 field. There are probably not many systems requiring more than 8 digits for user and group IDs, but the extended header values were
   2466 included for completeness, allowing overrides for all of the decimal values in the <i>tar</i> header.</p>
   2467 <p class="tent">The standard developers intended to describe the effective results of <i>pax</i> with regard to file ownerships and
   2468 permissions; implementations are not restricted in timing or sequencing the restoration of such, provided the results are as
   2469 specified.</p>
   2470 <p class="tent">Much of the text describing the extended headers refers to use in &quot;<b>write</b> or <b>copy</b> modes&quot;. The
   2471 <b>copy</b> mode references are due to the normative text: &quot;The effect of the copy shall be as if the copied files were written to
   2472 an archive file and then subsequently extracted ...&quot;. There is certainly no way to test whether <i>pax</i> is actually generating
   2473 the extended headers in <b>copy</b> mode, but the effects must be as if it had.</p>
   2474 <h5><a name="tag_20_94_18_02" id="tag_20_94_18_02"></a>pax Archive Character Set Encoding/Decoding</h5>
   2475 <p class="tent">There is a need to exchange archives of files between systems of different native codesets. Filenames, group names,
   2476 and user names must be preserved to the fullest extent possible when an archive is read on the receiving platform. Translation of
   2477 the contents of files is not within the scope of the <i>pax</i> utility.</p>
   2478 <p class="tent">There will also be the need to represent characters that are not available on the receiving platform. These
   2479 unsupported characters cannot be automatically folded to the local set of characters due to the chance of collisions. This could
   2480 result in overwriting previous extracted files from the archive or pre-existing files on the system.</p>
   2481 <p class="tent">For these reasons, the codeset used to represent characters within the extended header records of the <i>pax</i>
   2482 archive must be sufficiently rich to handle all commonly used character sets. The fields requiring translation include, at a
   2483 minimum, filenames, user names, group names, and link pathnames. Implementations may wish to have localized extended keywords that
   2484 use non-portable characters.</p>
   2485 <p class="tent">The standard developers considered the following options:</p>
   2486 <ul>
   2487 <li class="tent">The archive creator specifies the well-defined name of the source codeset. The receiver must then recognize the
   2488 codeset name and perform the appropriate translations to the destination codeset.</li>
   2489 <li class="tent">The archive creator includes within the archive the character mapping table for the source codeset used to encode
   2490 extended header records. The receiver must then read the character mapping table and perform the appropriate translations to the
   2491 destination codeset.</li>
   2492 <li class="tent">The archive creator translates the extended header records in the source codeset into a canonical form. The
   2493 receiver must then perform the appropriate translations to the destination codeset.</li>
   2494 </ul>
   2495 <p class="tent">The approach that incorporates the name of the source codeset poses the problem of codeset name registration, and
   2496 makes the archive useless to <i>pax</i> archive decoders that do not recognize that codeset.</p>
   2497 <p class="tent">Because parts of an archive may be corrupted, the standard developers felt that including the character map of the
   2498 source codeset was too fragile. The loss of this one key component could result in making the entire archive useless. (The
   2499 difference between this and the global extended header decision was that the latter has a workaround—duplicating extended header
   2500 records on unreliable media—but this would be too burdensome for large character set maps.)</p>
   2501 <p class="tent">Both of the above approaches also put an undue burden on the <i>pax</i> archive receiver to handle the
   2502 cross-product of all source and destination codesets.</p>
   2503 <p class="tent">To simplify the translation from the source codeset to the canonical form and from the canonical form to the
   2504 destination codeset, the standard developers decided that the internal representation should be a stateless encoding. A stateless
   2505 encoding is one where each codepoint has the same meaning, without regard to the decoder being in a specific state. An example of a
   2506 stateful encoding would be the Japanese Shift-JIS; an example of a stateless encoding would be the ISO/IEC&nbsp;646:1991 standard
   2507 (equivalent to 7-bit ASCII).</p>
   2508 <p class="tent">For these reasons, the standard developers decided to adopt a canonical format for the representation of file
   2509 information strings. The obvious, well-endorsed candidate is the ISO/IEC&nbsp;10646-1:2020 standard (based in part on Unicode),
   2510 which can be used to represent the characters of virtually all standardized character sets. The standard developers initially
   2511 agreed upon using UCS2 (16-bit Unicode) as the internal representation. This repertoire of characters provides a sufficiently rich
   2512 set to represent all commonly-used codesets.</p>
   2513 <p class="tent">However, the standard developers found that the 16-bit Unicode representation had some problems. It forced the
   2514 issue of standardizing byte ordering. The 2-byte length of each character made the extended header records twice as long for the
   2515 case of strings coded entirely from historical 7-bit ASCII. For these reasons, the standard developers chose the UTF-8 defined in
   2516 the ISO/IEC&nbsp;10646-1:2020 standard. This multi-byte representation encodes UCS2 or UCS4 characters reliably and
   2517 deterministically, eliminating the need for a canonical byte ordering. In addition, NUL octets and other characters possibly
   2518 confusing to POSIX file systems do not appear, except to represent themselves. It was realized that certain national codesets take
   2519 up more space after the encoding, due to their placement within the UCS range; it was felt that the usefulness of the encoding of
   2520 the names outweighs the disadvantage of size increase for file, user, and group names.</p>
   2521 <p class="tent">The encoding of UTF-8 is as follows:</p>
   2522 <pre>
   2523 <tt>UCS4 Hex Encoding  UTF-8 Binary Encoding
   2524 <br class="tent">
   2525 00000000-0000007F  0xxxxxxx
   2526 00000080-000007FF  110xxxxx 10xxxxxx
   2527 00000800-0000FFFF  1110xxxx 10xxxxxx 10xxxxxx
   2528 00010000-001FFFFF  11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
   2529 00200000-03FFFFFF  111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
   2530 04000000-7FFFFFFF  1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
   2531 </tt></pre>
   2532 <p class="tent">where each <tt>'x'</tt> represents a bit value from the character being translated.</p>
   2533 <h5><a name="tag_20_94_18_03" id="tag_20_94_18_03"></a>ustar Interchange Format</h5>
   2534 <p class="tent">The description of the <b>ustar</b> format reflects numerous enhancements over pre-1988 versions of the historical
   2535 <i>tar</i> utility. The goal of these changes was not only to provide the functional enhancements desired, but also to retain
   2536 compatibility between new and old versions. This compatibility has been retained. Archives written using the old archive format are
   2537 compatible with the new format.</p>
   2538 <p class="tent">Implementors should be aware that the previous file format did not include a mechanism to archive directory type
   2539 files. For this reason, the convention of using a filename ending with &lt;slash&gt; was adopted to specify a directory on the
   2540 archive.</p>
   2541 <p class="tent">The total size of the <i>name</i> and <i>prefix</i> fields have been set to meet the minimum requirements for
   2542 {PATH_MAX}. If a pathname will fit within the <i>name</i> field, it is recommended that the pathname be stored there without the
   2543 use of the <i>prefix</i> field. Although the name field is known to be too small to contain {PATH_MAX} characters, the value was
   2544 not changed in this version of the archive file format to retain backwards-compatibility, and instead the prefix was introduced.
   2545 Also, because of the earlier version of the format, there is no way to remove the restriction on the <i>linkname</i> field being
   2546 limited in size to just that of the <i>name</i> field.</p>
   2547 <p class="tent">The <i>size</i> field is required to be meaningful in all implementation extensions, although it could be zero.
   2548 This is required so that the data blocks can always be properly counted.</p>
   2549 <p class="tent">It is suggested that if device special files need to be represented that cannot be represented in the standard
   2550 format, that one of the extension types (<b>A</b>-<b>Z</b>) be used, and that the additional information for the special file be
   2551 represented as data and be reflected in the <i>size</i> field.</p>
   2552 <p class="tent">Attempting to restore a special file type, where it is converted to ordinary data and conflicts with an existing
   2553 filename, need not be specially detected by the utility. If run as an ordinary user, <i>pax</i> should not be able to overwrite the
   2554 entries in, for example, <b>/dev</b> in any case (whether the file is converted to another type or not). If run as a privileged
   2555 user, it should be able to do so, and it would be considered a bug if it did not. The same is true of ordinary data files and
   2556 similarly named special files; it is impossible to anticipate the needs of the user (who could really intend to overwrite the
   2557 file), so the behavior should be predictable (and thus regular) and rely on the protection system as required.</p>
   2558 <p class="tent">The value 7 in the <i>typeflag</i> field is intended to define how contiguous files can be stored in a <b>ustar</b>
   2559 archive. POSIX.1-2024 does not require the contiguous file extension, but does define a standard way of archiving such files so
   2560 that all conforming systems can interpret these file types in a meaningful and consistent manner. On a system that does not support
   2561 extended file types, the <i>pax</i> utility should do the best it can with the file and go on to the next.</p>
   2562 <p class="tent">The file protection modes are those conventionally used by the <a href="../utilities/ls.html"><i>ls</i></a>
   2563 utility. This is extended beyond the usage in the ISO&nbsp;POSIX-2 standard to support the &quot;shared text&quot; or &quot;sticky&quot; bit. It is
   2564 intended that the conformance document should not document anything beyond the existence of and support of such a mode. Further
   2565 extensions are expected to these bits, particularly with overloading the set-user-ID and set-group-ID flags.</p>
   2566 <h5><a name="tag_20_94_18_04" id="tag_20_94_18_04"></a>cpio Interchange Format</h5>
   2567 <p class="tent">The reference to appropriate privileges in the <b>cpio</b> format refers to an error on standard output; the
   2568 <b>ustar</b> format does not make comparable statements.</p>
   2569 <p class="tent">The model for this format was the historical System V <i>cpio</i><b>-c</b> data interchange format. This model
   2570 documents the portable version of the <b>cpio</b> format and not the binary version. It has the flexibility to transfer data of any
   2571 type described within POSIX.1-2024, yet is extensible to transfer data types specific to extensions beyond POSIX.1-2024 (for
   2572 example, contiguous files). Because it describes existing practice, there is no question of maintaining upwards-compatibility.</p>
   2573 <h5><a name="tag_20_94_18_05" id="tag_20_94_18_05"></a>cpio Header</h5>
   2574 <p class="tent">There has been some concern that the size of the <i>c_ino</i> field of the header is too small to handle those
   2575 systems that have very large <i>inode</i> numbers. However, the <i>c_ino</i> field in the header is used strictly as a hard-link
   2576 resolution mechanism for archives. It is not necessarily the same value as the <i>inode</i> number of the file in the location from
   2577 which that file is extracted.</p>
   2578 <p class="tent">The name <i>c_magic</i> is based on historical usage.</p>
   2579 <h5><a name="tag_20_94_18_06" id="tag_20_94_18_06"></a>cpio Filename</h5>
   2580 <p class="tent">For most historical implementations of the <i>cpio</i> utility, {PATH_MAX} octets can be used to describe the
   2581 pathname without the addition of any other header fields (the NUL character would be included in this count). {PATH_MAX} is the
   2582 minimum value for pathname size, documented as 256 bytes. However, an implementation may use <i>c_namesize</i> to determine the
   2583 exact length of the pathname. With the current description of the <a href="../basedefs/cpio.h.html"><i>&lt;cpio.h&gt;</i></a>
   2584 header, this pathname size can be as large as a number that is described in six octal digits.</p>
   2585 <p class="tent">Two values are documented under the <i>c_mode</i> field values to provide for extensibility for known file
   2586 types:</p>
   2587 <dl compact>
   2588 <dd></dd>
   2589 <dt><b>0110&nbsp;000</b></dt>
   2590 <dd>Reserved for contiguous files. The implementation may treat the rest of the information for this archive like a regular file.
   2591 If this file type is undefined, the implementation may create the file as a regular file.</dd>
   2592 </dl>
   2593 <p class="tent">This provides for extensibility of the <b>cpio</b> format while allowing for the ability to read old archives.
   2594 Files of an unknown type may be read as &quot;regular files&quot; on some implementations. On a system that does not support extended file
   2595 types, the <i>pax</i> utility should do the best it can with the file and go on to the next.</p>
   2596 </blockquote>
   2597 <h4 class="mansect"><a name="tag_20_94_19" id="tag_20_94_19"></a>FUTURE DIRECTIONS</h4>
   2598 <blockquote>
   2599 <p>If this utility is directed to display a pathname that contains any bytes that have the encoded value of a &lt;newline&gt;
   2600 character when &lt;newline&gt; is a terminator or separator in the output format being used, implementations are encouraged to
   2601 treat this as an error. A future version of this standard may require implementations to treat this as an error.</p>
   2602 <p class="tent">If this utility is directed to create a new directory entry that contains any bytes that have the encoded value of
   2603 a &lt;newline&gt; character, implementations are encouraged to treat this as an error. A future version of this standard may
   2604 require implementations to treat this as an error.</p>
   2605 </blockquote>
   2606 <h4 class="mansect"><a name="tag_20_94_20" id="tag_20_94_20"></a>SEE ALSO</h4>
   2607 <blockquote>
   2608 <p><a href="../utilities/V3_chap02.html#tag_19"><i>2. Shell Command Language</i></a> , <a href=
   2609 "../utilities/cp.html#"><i>cp</i></a> , <a href="../utilities/ed.html#"><i>ed</i></a> , <a href=
   2610 "../utilities/getopts.html#"><i>getopts</i></a> , <a href="../utilities/ls.html#"><i>ls</i></a> , <a href=
   2611 "../utilities/printf.html#tag_20_96"><i>printf</i></a></p>
   2612 <p class="tent">XBD <a href="../basedefs/V1_chap03.html#tag_03_145"><i>3.145 File Mode Bits</i></a> , <a href=
   2613 "../basedefs/V1_chap05.html#tag_05"><i>5. File Format Notation</i></a> , <a href="../basedefs/V1_chap08.html#tag_08"><i>8.
   2614 Environment Variables</i></a> , <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a> , <a href=
   2615 "../basedefs/cpio.h.html"><i>&lt;cpio.h&gt;</i></a> , <a href="../basedefs/tar.h.html"><i>&lt;tar.h&gt;</i></a></p>
   2616 <p class="tent">XSH <a href="../functions/chown.html#tag_17_73"><i>chown</i></a> , <a href=
   2617 "../functions/creat.html#"><i>creat</i></a> , <a href="../functions/fstatat.html#"><i>fstatat</i></a> , <a href=
   2618 "../functions/futimens.html#"><i>futimens</i></a> , <a href="../functions/mkdir.html#tag_17_338"><i>mkdir</i></a> , <a href=
   2619 "../functions/mkfifo.html#tag_17_340"><i>mkfifo</i></a> , <a href="../functions/write.html#tag_17_699"><i>write</i></a></p>
   2620 </blockquote>
   2621 <h4 class="mansect"><a name="tag_20_94_21" id="tag_20_94_21"></a>CHANGE HISTORY</h4>
   2622 <blockquote>
   2623 <p>First released in Issue 4.</p>
   2624 </blockquote>
   2625 <h4 class="mansect"><a name="tag_20_94_22" id="tag_20_94_22"></a>Issue 5</h4>
   2626 <blockquote>
   2627 <p>A note is added to the APPLICATION USAGE indicating that the <b>cpio</b> and <b>tar</b> formats can only support files up to 8
   2628 gigabytes in size.</p>
   2629 </blockquote>
   2630 <h4 class="mansect"><a name="tag_20_94_23" id="tag_20_94_23"></a>Issue 6</h4>
   2631 <blockquote>
   2632 <p>The <i>pax</i> utility is aligned with the IEEE&nbsp;P1003.2b draft standard:</p>
   2633 <ul>
   2634 <li class="tent">Support has been added for symbolic links in the options and interchange formats.</li>
   2635 <li class="tent">A new format has been devised, based on extensions to <b>ustar</b>.</li>
   2636 <li class="tent">References to the &quot;extended&quot; <b>tar</b> and <b>cpio</b> formats derived from the POSIX.1-1990 standard have been
   2637 changed to remove the &quot;extended&quot; adjective because this could cause confusion with the extended <b>tar</b> header added in this
   2638 version. (All references to <b>tar</b> are actually to <b>ustar</b>.)</li>
   2639 </ul>
   2640 <p class="tent">The <i>TZ</i> entry is added to the ENVIRONMENT VARIABLES section.</p>
   2641 <p class="tent">IEEE PASC Interpretation 1003.2 #168 is applied, clarifying that <a href=
   2642 "../functions/mkdir.html"><i>mkdir</i>()</a> and <a href="../functions/mkfifo.html"><i>mkfifo</i>()</a> calls can ignore an
   2643 [EEXIST] error when extracting an archive.</p>
   2644 <p class="tent">IEEE PASC Interpretation 1003.2 #180 is applied, clarifying how extracted files are created when in <b>read</b>
   2645 mode.</p>
   2646 <p class="tent">IEEE PASC Interpretation 1003.2 #181 is applied, clarifying the description of the <b>-t</b> option.</p>
   2647 <p class="tent">IEEE PASC Interpretation 1003.2 #195 is applied.</p>
   2648 <p class="tent">IEEE PASC Interpretation 1003.2 #206 is applied, clarifying the handling of links for the <b>-H</b>, <b>-L</b>, and
   2649 <b>-l</b> options.</p>
   2650 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;1-2002, item XCU/TC1/D6/35 is applied, adding the process ID of the
   2651 <i>pax</i> process into certain fields. This change provides a method for the implementation to ensure that different instances of
   2652 <i>pax</i> extracting a file named <b>/a/b/foo</b> will not collide when processing the extended header information associated with
   2653 <b>foo</b>.</p>
   2654 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;1-2002, item XCU/TC1/D6/36 is applied, changing <b>-x B</b> to <b>-x</b>
   2655 <i>pax</i> in the OPTIONS section.</p>
   2656 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/20 is applied, updating the SYNOPSIS to be
   2657 consistent with the normative text.</p>
   2658 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/21 is applied, updating the DESCRIPTION to describe
   2659 the behavior when files to be linked are symbolic links and the system is not capable of making hard links to symbolic links.</p>
   2660 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/22 is applied, updating the OPTIONS section to
   2661 describe the behavior for how multiple <b>-o</b><b>delete=pattern</b> options are to be handled.</p>
   2662 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/23 is applied, updating the <b>write</b> option
   2663 within the OPTIONS section.</p>
   2664 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/24 is applied, adding a paragraph into the OPTIONS
   2665 section that states that specifying more than one of the mutually-exclusive options (<b>-H</b> and <b>-L</b>) is not considered an
   2666 error and that the last option specified will determine the behavior of the utility.</p>
   2667 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/25 is applied, removing the <i>ctime</i> paragraph
   2668 within the EXTENDED DESCRIPTION. There is a contradiction in the definition of the <i>ctime</i> keyword for the <i>pax</i> extended
   2669 header, in that the <i>st_ctime</i> member of the <b>stat</b> structure does not refer to a file creation time. No field in the
   2670 standard <b>stat</b> structure from <a href="../basedefs/sys_stat.h.html"><i>&lt;sys/stat.h&gt;</i></a> includes a file creation
   2671 time.</p>
   2672 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/26 is applied, making it clear that <i>typeflag</i>
   2673 1 (<b>ustar</b> Interchange Format) applies not only to files that are hard-linked, but also to files that are aliased via symbolic
   2674 links.</p>
   2675 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;2-2004, item XCU/TC2/D6/27 is applied, clarifying the <i>cpio</i>
   2676 <i>c_nlink</i> field.</p>
   2677 </blockquote>
   2678 <h4 class="mansect"><a name="tag_20_94_24" id="tag_20_94_24"></a>Issue 7</h4>
   2679 <blockquote>
   2680 <p>Austin Group Interpretations 1003.1-2001 #011, #036, #086, and #109 are applied.</p>
   2681 <p class="tent">Austin Group Interpretation 1003.1-2001 #126 is applied, changing the description of the <i>LC_MESSAGES</i>
   2682 environment variable.</p>
   2683 <p class="tent">SD5-XCU-ERN-2 is applied, making <b>-c</b> and <b>-n</b> mutually-exclusive in the SYNOPSIS.</p>
   2684 <p class="tent">SD5-XCU-ERN-3 is applied, revising the default behavior of <b>-H</b> and <b>-L</b>.</p>
   2685 <p class="tent">SD5-XCU-ERN-5, SD5-XCU-ERN-6, SD5-XCU-ERN-7, SD5-XCU-ERN-60 are applied.</p>
   2686 <p class="tent">SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p>
   2687 <p class="tent">The <i>pax</i> utility is no longer allowed to create separate identical symbolic links when extracting linked
   2688 symbolic links from an archive.</p>
   2689 <p class="tent">POSIX.1-2008, Technical Corrigendum 1, XCU/TC1-2008/0128 [260], XCU/TC1-2008/0129 [261], XCU/TC1-2008/0130 [261],
   2690 XCU/TC1-2008/0131 [313], and XCU/TC1-2008/0132 [233] are applied.</p>
   2691 <p class="tent">POSIX.1-2008, Technical Corrigendum 2, XCU/TC2-2008/0152 [886], XCU/TC2-2008/0153 [814], XCU/TC2-2008/0154 [886],
   2692 and XCU/TC2-2008/0155 [707] are applied.</p>
   2693 </blockquote>
   2694 <h4 class="mansect"><a name="tag_20_94_25" id="tag_20_94_25"></a>Issue 8</h4>
   2695 <blockquote>
   2696 <p>Austin Group Defect 251 is applied, encouraging implementations to behave as follows:</p>
   2697 <ol type="a">
   2698 <li class="tent">Report an error if a utility is directed to display a pathname that contains any bytes that have the encoded value
   2699 of a &lt;newline&gt; character when &lt;newline&gt; is a terminator or separator in the output format being used.</li>
   2700 <li class="tent">Disallow the creation of filenames containing any bytes that have the encoded value of a &lt;newline&gt;
   2701 character.</li>
   2702 </ol>
   2703 <p class="tent">Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
   2704 <p class="tent">Austin Group Defect 1133 is applied, clarifying the <b>-X</b> option and adding a paragraph to the APPLICATION
   2705 USAGE section.</p>
   2706 <p class="tent">Austin Group Defect 1270 is applied, removing the <b>-n</b> option from the copy mode SYNOPSIS line.</p>
   2707 <p class="tent">Austin Group Defect 1278 is applied, removing mention of the <b>-n</b> option in connection with write mode.</p>
   2708 <p class="tent">Austin Group Defect 1330 is applied, removing obsolescent interfaces.</p>
   2709 <p class="tent">Austin Group Defect 1331 is applied, changing &quot;st_atime&quot; to &quot;st_atim&quot; and &quot;st_mtime&quot; to &quot;st_mtim&quot;.</p>
   2710 <p class="tent">Austin Group Defect 1379 is applied, changing the ENVIRONMENT VARIABLES section.</p>
   2711 <p class="tent">Austin Group Defect 1380 is applied, changing text using the term &quot;link&quot; in line with its updated definition and
   2712 changing the description of the <b>-u</b> option.</p>
   2713 <p class="tent">Austin Group Defect 1618 is applied, adding optional trailing <tt>'s'</tt> and <tt>'S'</tt> characters to the
   2714 option-argument of the <b>-s</b> option.</p>
   2715 </blockquote>
   2716 <div class="box"><em>End of informative text.</em></div>
   2717 <hr>
   2718 <p>&nbsp;</p>
   2719 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
   2720 <hr size="2" noshade>
   2721 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
   2722 POSIX™ is a Trademark of The IEEE.<br>
   2723 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
   2724 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
   2725 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
   2726 ]</font></center>
   2727 <hr size="2" noshade>
   2728 <div class="NAVHEADER">
   2729 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
   2730 <tr class="nav">
   2731 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/pathchk.html" accesskey="P">&lt;&lt;&lt;
   2732 Previous</a></td>
   2733 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
   2734 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/pr.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
   2735 </tr>
   2736 </table>
   2737 <hr align="left" width="100%"></div>
   2738 </body>
   2739 </html>