📄 pax.html
字号:
<dt><b>-t</b><dd>Cause the access times of the archived files to be the sameas they were before being read by<i>pax</i>.<br><dt><b>-u</b><dd>Ignore files that are older (having a less recentfile modification time) than a pre-existing file orarchive member with the same name.In read mode,an archivemember with the same name as a file in the file systemwill be extracted if the archive member is newer than the file.In write mode,an archive file member with thesame name as a file in the file system will besuperseded if the file is newer than the archive member.It is unspecified if this is accomplished by actualreplacement in the archive or by appending to the archive.In copy mode,the file in the destination hierarchy will be replaced by thefile in the source hierarchyor by a link to the file in the source hierarchyif the file in the source hierarchy is newer.<br><dt><b>-v</b><dd>In list mode,produce a verbose table of contents (see the STDOUT section).Otherwise, write archive member pathnames to standard error (seethe STDERR section).<br><dt><b>-x </b><i>format</i><dd>Specify the output archive format.The<i>pax</i>utility recognises the following formats:<dl compact><dt><b>cpio</b><dd>The extended<i><a href="cpio.html">cpio</a></i>interchange format; see the EXTENDED DESCRIPTION section.The default<i>blocksize</i>for this format for character special archive files is 5120.Implementations support all<i>blocksize</i>values less than or equal to 32256that are multiples of 512.<dt><b>ustar</b><dd>The extended<i><a href="tar.html">tar</a></i>interchange format; see the EXTENDED DESCRIPTION section.The default<i>blocksize</i>for this format for character special archive filesis 10240.Implementations support all<i>blocksize</i>values less than or equal to 32256that are multiples of 512.</dl><p>Implementation-dependent formats will specify a defaultblock size as well as any other block sizes supportedfor character special archive files.<p>Any attempt to append to an archive file in a format differentfrom the existing archive format will cause<i>pax</i>to exit immediately with a non-zero exit status.<br><dt><b>-X</b><dd>When traversing the file hierarchy specified by a pathname,<i>pax</i>will not descend into directories that have a different device ID(<b>st_dev</b>,see the <b>XSH</b> specification<i><a href="../xsh/stat.html">stat()</a></i>).<p></dl><p>The options that operate on the names of files or archive members(<b>-c</b>,<b>-i</b>,<b>-n</b>,<b>-s</b>,<b>-u</b>and<b>-v</b>)interact as follows.In read mode, the archive members are selectedbased on the 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<b>-i</b>options will modify, in that order,the names of the selected files.The<b>-v</b>option will writenames resulting from these modifications.<p>In write mode, thefiles are selected based on the user-specified pathnames asmodified by the<b>-n</b>and<b>-u</b>options.Then, any<b>-s</b>and<b>-i</b>options will, in that order, modify the names of these selected files.The<b>-v</b>option will write names resulting from these modifications.<p>If both the<b>-u</b>and<b>-n</b>options are specified,<i>pax</i>does not consider a file selected unless it is newer than the file towhich it is compared.</blockquote><h4><a name = "tag_001_014_1692"> </a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>directory</i><dd>The destination directory pathname for copy mode.<dt><i>file</i><dd>A pathname of a file to be copied or archived.<dt><i>pattern</i><dd>A pattern matching one or more pathnames of archive members.A pattern must be given in the name-generating notationof the pattern matching notation in<xref href=patmat><a href="chap2.html#tag_001_013">Pattern Matching Notation</a></xref>,including the filename expansion rules in<xref href=patfilx><a href="chap2.html#tag_001_013_003">Patterns Used for Filename Expansion</a></xref>.The default, if no<i>pattern</i>is specified, isto select all members in the archive.</dl></blockquote><h4><a name = "tag_001_014_1693"> </a>STDIN</h4><blockquote>In write mode,the standard input is used only if no<i>file</i>operands are specified.It must be a text file containing a list of pathnames, one per line,without leading or trailingblank characters.<p>In list and read modes,the standard inputmust be an archive file.<p>Otherwise, the standard input will not be used.</blockquote><h4><a name = "tag_001_014_1694"> </a>INPUT FILES</h4><blockquote>The input file named by the<i>archive</i>option-argument,or standard input when the archive is read from there,will be a file formatted according toone of the specifications in the EXTENDED DESCRIPTION sectionor some other, implementation-dependent, format.<p>The file<b>/dev/tty</b>is used to write prompts and read responses.</blockquote><h4><a name = "tag_001_014_1695"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>pax</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_COLLATE</i><dd>Determine the locale for thebehaviour of ranges, equivalence classesand multi-character collating elementsused in thepattern matching expressions for the<i>pattern</i>operand, the basic regular expression for the<b>-s</b>option, and theextended regular expression defined for the<b>yesexpr</b>locale keyword in the LC_MESSAGES category.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files),the behaviour of character classesused in the extended regular expression defined for the<b>yesexpr</b>locale keyword in the LC_MESSAGES category,and pattern matching.<dt><i>LC_MESSAGES</i><dd>Determine the locale for the processing of affirmative responsesthat should be used to affect the format and contents of diagnosticmessages written to standard error.<dt><i>LC_TIME</i><dd>Determine the format and contents of date and time strings when the<b>-v</b>option is specified.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_1696"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_1697"> </a>STDOUT</h4><blockquote>In write mode, if<b>-f</b>is not specified, thestandard output will be the archiveformatted according toone of the specifications in the EXTENDED DESCRIPTION section,or some other implementation-dependent format.(See<b>-x</b> <i>format</i>.)<p>In list mode, thetable of contents of the selected archive members will be written tostandard output using the following format:<code><p><tt>"%s\n"</tt>, <<i>pathname</i>></code><p>If the<b>-v</b>option is specified in list mode, the table of contents of the selectedarchive members will be written to standard output using thefollowing formats:<p>For pathnames representing hard links to previous members of the archive:<code><p><tt>"%s<img src="../images/delta.gif" border=0>==<img src="../images/delta.gif" border=0>%s\n"</tt>, <<i>ls -l listing</i>>,<<i>linkname</i>></code><p>For all other pathnames:<code><p><tt>"%s\n"</tt>, <<i>ls -l listing</i>></code><p>where<<i>ls -l listing</i>>is the format specified by the<i><a href="ls.html">ls</a></i>utilitywith the<b>-l</b>option.When writing pathnames in this format, it isunspecified what is written for fields for which theunderlying archive format does not have the correct information,although the correct number ofblank-character-separatedfields will be written.<p>In list mode,standard output will not be buffered more than a line at a time.</blockquote><h4><a name = "tag_001_014_1698"> </a>STDERR</h4><blockquote>If<b>-v</b>is specified in read, write or copy modes,<i>pax</i>will write thepathnames it processes to the standard error output using thefollowing format:<code><p><tt>"%s\n"</tt>, <<i>pathname</i>></code><p>These pathnames will be written as soon as processing is begunon the file or archive member, and will be flushed to standard error.The trailingnewline character,which will not be buffered,will be written when the file has been read or written.<p>If the<b>-s</b>option is specified, and the replacement string hasa trailingp,substitutions will be written tostandard error in the following format:<code><p><tt>"%s<img src="../images/delta.gif" border=0>>><img src="../images/delta.gif" border=0>%s\n"</tt>, <<i>original pathname</i>>,<<i>new pathname</i>></code><p>In all operating modes of<i>pax</i>,optional messages of unspecified format concerningthe input archive format and volume number,the numberof files, blocks, volumes and media parts as well as otherdiagnostic messages may be written to standard error.<p>In all formats, for both standard output and standard error, it isunspecified how non-printable characters in pathnames or linknamesare written.</blockquote><h4><a name = "tag_001_014_1699"> </a>OUTPUT FILES</h4><blockquote>In read mode,the extracted or copied outputfiles are of the archived file type.<p>In write mode, theoutput file named by the<b>-f</b>option-argument is a fileformatted according to one of the specifications inthe EXTENDED DESCRIPTION section,or some other, implementation-dependent format.</blockquote><h4><a name = "tag_001_014_1700"> </a>EXTENDED DESCRIPTION</h4><blockquote><h5><a name = "tag_001_014_1700_001"> </a>Extended cpio Format</h5>The octet-oriented<i><a href="cpio.html">cpio</a></i>archive format is a series of entries,each comprising a headerthat describes the file, the name of the file and then thecontents of the file.<p>An archive may be recorded as a series of fixed-size blocks of octets.This blocking will be used only to make physicalI/Omore efficient.The last group of blocks always will be at the full size.<p>For theoctet-oriented<i><a href="cpio.html">cpio</a></i>archive format, the individual entryinformation will be in the order indicated and described bythe following table:<pre><table bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Header Field Name</b><th align=center><b>Length (in Octets)</b><th align=center><b>Interpreted as</b><tr valign=top><td align=left><b>c_magic</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_dev</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_ino</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_mode</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_uid</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_gid</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_nlink</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_rdev</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_mtime</b><td align=left>11<td align=left>Octal number<tr valign=top><td align=left><b>c_namesize</b><td align=left>6<td align=left>Octal number<tr valign=top><td align=left><b>c_filesize</b><td align=left>11<td align=left>Octal number<tr valign=top><th align=left><b>Filename Field Name</b><th align=left>Length<th align=left>Interpreted as<tr valign=top><td align=left><b>c_name</b><td align=left>c_namesize<td align=left>Pathname string<tr valign=top><th align=left><b>File Data Field Name</b><th align=left>Length<th align=left>Interpreted as<tr valign=top><td align=left><b>c_filedata</b><td align=left>c_filesize
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -