pax man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

pax(1)									pax(1)

NAME
       pax  -  extracts,  writes,  and	lists  archive files; copies files and
       directory hierarchies

SYNOPSIS
   Listing Member Files of Archived Files
       archive] options]... replstr]... [pattern]...

   Extracting Archive Files
       archive] options]... string]... replstr]... [pattern]...

   Writing Archive Files
       blocking] archive] options]... replstr]... format] [file]...

   Copying Files
       options]... string]... replstr]... [file]... directory

DESCRIPTION
       The command extracts and writes member files of archive	files;	writes
       lists  of  the  member  files of archives; and copies directory hierar‐
       chies. The and flags specify the archive	 operation  performed  by  the
       command.

       The pattern argument specifies a pattern that matches one or more paths
       of archive members. A (backslash) character is not  recognized  in  the
       pattern	argument  and it prevents the subsequent character from having
       any special meaning. If no pattern argument is specified,  all  members
       are selected in the archive.

       If  a  pattern  argument is specified, but no archive members are found
       that match the pattern specified, the command detects the error,	 exits
       with a nonzero exit status, and writes a diagnostic message.

       The command can read both and archives.	In the case of this means that
       can read ASCII archives (which are created  with	 and  binary  archives
       (which are created without the flag).

       can  also write archives that and can read; by default, writes archives
       in the extended interchange format.  also writes	 ASCII	archives;  use
       the flag to specify this extended output format.

       also  reads  and	 writes	 archives  in the interchange format, IEEE Std
       1003.1, 2003 Edition. Use the flag to specify this format. Refer to the
       description of the option for more details.

       The supported archive formats are automatically detected on input.  All
       three formats are explained in greater detail under

       The four combinations of and are referred to as the four modes of oper‐
       ation: and modes, corresponding respectively to the four forms shown in
       the section.

       In      mode (when neither nor are specified), shall write the names of
	       the  members  of the archive file read from the standard input,
	       with pathnames matching the  specified  patterns,  to  standard
	       output.	If a named file is of type directory, the file hierar‐
	       chy rooted at that file shall be listed as well.

       In      mode (when is specified, but is not), shall extract the members
	       of  the	archive	 file read from the standard input, with path‐
	       names matching the specified patterns. If an extracted file  is
	       of type directory, the file hierarchy rooted at that file shall
	       be extracted as well.  The extracted  files  shall  be  created
	       performing  pathname resolution with the directory in which was
	       invoked as the current working directory.

	       If an attempt is made to extract a directory when the directory
	       already	exists,	 this  shall not be considered an error. If an
	       attempt is made to extract a FIFO when the FIFO already exists,
	       this shall not be considered an error.

       In      mode  (when is specified, but is not), shall write the contents
	       of the file operands to the standard output in an archive  for‐
	       mat.  If	 no  file  operands  are specified, a list of files to
	       copy, one per line, shall be read from the  standard  input.  A
	       file  of	 type  directory shall include all of the files in the
	       file hierarchy rooted at the file.

       In      mode (when both and are specified), shall copy the  file	 oper‐
	       ands to the destination directory.

	       If no file operands are specified, a list of files to copy, one
	       per line, shall be read from the standard input. A file of type
	       directory  shall include all of the files in the file hierarchy
	       rooted at the file.

	       The effect of the copy shall be as if  the  copied  files  were
	       written	to  an	archive	 file and then subsequently extracted,
	       except that there may be hard links between  the	 original  and
	       the  copied  files. If the destination directory is a subdirec‐
	       tory of one of the files to be copied, the results are unspeci‐
	       fied.  It shall be an error for the file named by the directory
	       operand not to exist, not be writable by the user, or not be  a
	       file of type directory.

       In  or  modes,  if intermediate directories are necessary to extract an
       archive member,	shall  perform	actions	 equivalent  to	 the  function
       defined in the System Interfaces volume of IEEE Std 1003.1-2001, called
       with the following arguments:

       1.  The intermediate directory used as the path argument,

       2.  The value of the bitwise-inclusive OR of and as the mode argument.

       If the selected archive format supports	the  specification  of	linked
       files,  it  shall  be an error if these files cannot be linked when the
       archive is extracted, except that if the files to be  linked  are  sym‐
       bolic  links then separate copies of the symbolic link shall be created
       instead. For archive formats that do not store file contents with  each
       name that causes a hard link, if the file that contains the data is not
       extracted during this session, a diagnostic message shall be  displayed
       with the name of a file that can be used to extract the data.

   Options
       Appends files to the end of the archive.
		      Certain devices might not support appending.

       Backs  up  and  extracts	 optional  entries of access control lists for
       files.
		      This option is applicable	 only  for  the	 format.   The
		      default  behaviour  is  not  to  back  up or extract the
		      optional ACL  entries.   The  PAX-ENH  product  must  be
		      installed to enable this option.	If a login name cannot
		      be found in the password file of the extracting machine,
		      the file is extracted without its ACL and a warning mes‐
		      sage is printed.	Hence, it might be required to extract
		      the password file before attempting to extract ACLs.

       Specifies  the block size for output to be the positive decimal integer
       of bytes
		      specified by the blocking argument. Blocking is automat‐
		      ically determined on input.

		      To  create portable archives, specify a block size value
		      less than or  equal  to  32,256  in  multiples  of  512.
		      Default  blocking	 when creating archives depends on the
		      archive format. (See the flag description.)

       Matches all file or archive members except those specified
		      by the pattern or file arguments.

       Causes directories being copied or archived, or archived
		      directories being extracted, to match only the directory
		      or archived directory itself and not the contents of the
		      directory or archived directory.

       Specifies the path of an archive file to be used	 instead  of  standard
       input (when the
		      flag  is not specified) or the standard output (when the
		      flag is specified but the flag is not).  When  specified
		      with  the	 flag,	any  files  written to the archive are
		      appended to the end of the archive.

       If a symbolic link referencing a file of type directory is specified
		      on the command line, shall archive  the  file  hierarchy
		      rooted  in  the  file  referenced by the link, using the
		      name of the link as the root of the file hierarchy. Oth‐
		      erwise,  if  a  symbolic	link referencing a file of any
		      other file type which can normally archive is  specified
		      on  the command line, then shall archive the file refer‐
		      enced by the link, using	the  name  of  the  link.  The
		      default  behavior	 shall be to archive the symbolic link
		      itself.

       Renames files or archives interactively. For each
		      archive member that matches the pattern argument or file
		      that matches a file argument, a prompt is written to the
		      terminal that contains the name of  a  file  or  archive
		      member.  A  line is then read from the terminal. If this
		      line is empty, the file or archive member is skipped. If
		      this  line consists of a dot, the file or archive member
		      is processed with no modification to  its	 name.	Other‐
		      wise,  its  name	is  replaced  with the contents of the
		      line.  The command immediately exits with a nonzero exit
		      status  if  an End-of-File is encountered when reading a
		      response or if it cannot read or write to the terminal.

       Prevents the   command from writing over existing files.

       Links files when copying files.
		      When both and are specified, hard links are  established
		      between  the  source  and	 destination  file hierarchies
		      whenever possible.

       If a symbolic link referencing a file of type directory is specified on
		      the command line or encountered during the traversal  of
		      a	 file  hierarchy,  shall  archive  the	file hierarchy
		      rooted in the file referenced by	the  link,  using  the
		      name of the link as the root of the file hierarchy. Oth‐
		      erwise, if a symbolic link referencing  a	 file  of  any
		      other  file type which can normally archive is specified
		      on the command line or encountered during the  traversal
		      of  a  file hierarchy, shall archive the file referenced
		      by the link, using the name of  the  link.  The  default
		      behavior shall be to archive the symbolic link itself.

       Selects the first archive member that matches each
		      pattern  argument.   No  more than one archive member is
		      matched for  each	 pattern  (although  members  of  type
		      directory	 will still match the file hierarchy rooted at
		      that file).

       Provides information to the implementation to modify the algorithm for
		      extracting or writing files. The value of options	 shall
		      consist  of  one or more comma-separated keywords of the
		      form:

		      Some keywords apply only to  certain  file  formats,  as
		      indicated	 with  each  description. Use of keywords that
		      are inapplicable to  the	file  format  being  processed
		      causes to print an error message and ignore the keyword.
		      However will continue processing the archive.   Keywords
		      in  the options argument shall be a string that would be
		      a valid portable filename as described in the Base Defi‐
		      nitions  volume  of IEEE Std 1003.1-2001, Section 3.276,
		      Portable Filename Character Set.

		      Note: Keywords are not expected to be filenames,	merely
		      to follow the same character composition rules as porta‐
		      ble filenames.

		      The value field shall consist of zero  or	 more  charac‐
		      ters;  within  value,  the application shall precede any
		      literal comma with a backslash, which shall be  ignored,
		      but preserves the comma as part of value. A comma as the
		      final character, or a comma  followed  solely  by	 white
		      space  as	 the  final  characters,  in  options shall be
		      ignored.	Multiple options can be specified; if keywords
		      given  to	 these multiple options conflict, the keywords
		      and values appearing  later  in  command	line  sequence
		      shall  take precedence and the earlier shall be silently
		      ignored.	Also, if the value specified for a keyword  is
		      invalid, shall print a suitable error message and behave
		      as if the keyword were  not  specified  in  the  command
		      line.   The following keyword values of options shall be
		      supported for the file formats as indicated:

		      (Applicable only to the
			     format.) When used in or mode,  shall  omit  from
			     extended header records that it produces any key‐
			     words matching the string pattern. When  used  in
			     or	 mode,	shall ignore any keywords matching the
			     string pattern in the extended header records. In
			     both cases, matching shall be performed using the
			     pattern matching notation described  in  and  For
			     example, the following pattern:

			     would  suppress  user  and group name keywords in
			     the extended header.

			     See for extended  header  record  keyword	usage.
			     When multiple options are specified, the patterns
			     shall be  additive;  all  keywords	 matching  the
			     specified	string	patterns shall be omitted from
			     extended header records that pax produces.

		      (Applicable only to the
			     format.)  path specifies a file or a directory to
			     be	 excluded  from	 the  tree  being backed up or
			     extracted.	 The path specified must be a part  of
			     the  tree.	 Otherwise, the specified path will be
			     ignored.  The PAX-ENH product must	 be  installed
			     to enable this option.

		      (Applicable only to the
			     format.)	This  keyword allows user control over
			     the name that is written into the	header	blocks
			     for  the  extended header produced under the cir‐
			     cumstances described in The  name	shall  be  the
			     contents of string, after the following character
			     substitutions have been made:

			   The directory name of the file, equivalent  to  the
			   result of the dirname utility on the
				  translated pathname.

			   The	filename of the file, equivalent to the result
			   of the basename utility on the
				  translated pathname.

			   The process ID of the pax process.

			   A '%' character.

			     If there are any other '%' characters in or if no
			     is	 specified,  shall  use	 the following default
			     value:

		      (Applicable only to the
			     format.)  This keyword allows user	 control  over
			     the  name	that is written into the header blocks
			     for global	 extended  header  records.  The  name
			     shall  be	the contents of string, after the fol‐
			     lowing character substitutions have been made:

			   An integer that represents the sequence  number  of
			   the global extended header record
				  in the archive, starting at 1.

			   The process ID of the pax process.

			   A '%' character.

			     If there are any other '%' characters in or if no
			     is specified, shall  use  the  following  default
			     value:

			     where  represents	the  value  of the environment
			     variable.	If is not set, shall use

		      (Applicable only to the
			     format.)  graph_file defines the graph file.  The
			     graph  file is a text file containing the list of
			     file names of trees to be	included  or  excluded
			     from  the	backup graph.  Graph file entries con‐
			     sist of a line beginning with either (include) or
			     (exclude),	 followed by white space, and then the
			     path name of a tree.  Lines not beginning with or
			     are  treated  as  an  error.  There is no default
			     graph file.  For  example,	 to  back  up  all  of
			     except  for  the  subtree a file could be created
			     with the following two records:

			     The PAX-ENH product must be installed  to	enable
			     this option.

		      (Applicable only to the
			     format.)  This  keyword  allows user control over
			     the action takes upon encountering values	in  an
			     extended  header  record  that,  in  or mode, are
			     invalid in the destination hierarchy. The follow‐
			     ing  are  invalid values that shall be recognized
			     by In or mode, a filename or link	name  that  is
			     longer  than  the maximum allowed in the destina‐
			     tion hierarchy.

			     The following mutually-exclusive  values  of  the
			     action argument are supported:

			   In	     or	 mode,	shall bypass the file, causing
				     no change to the destination hierarchy.

			   In	     or mode, shall act as if the option  were
				     in	 effect	 for  each  file  with invalid
				     filename or link  name  values,  allowing
				     the  user	to  provide a replacement name
				     interactively.

			   In	     or mode, shall write the file,  translat‐
				     ing  the  name regardless of whether this
				     may overwrite an  existing	 file  with  a
				     valid  name.  This action argument is not
				     supported for files having	 invalid  link
				     names.

			     If	 no  option  is specified, shall act as if was
			     specified. Any overwriting of existing files that
			     may be allowed by the actions shall be subject to
			     permission and  modification  time	 restrictions,
			     and  shall	 be  suppressed	 if the option is also
			     specified.

		      (Applicable only to the
			     format.) In mode, shall write the contents	 of  a
			     file to the archive even when that file is merely
			     a hard link to a file whose contents have already
			     been written to the archive.

		      This keyword specifies the output format of the table of
		      contents produced when the
			     option is specified in mode. See To avoid ambigu‐
			     ity,  the format shall be the only or final value
			     pair in a option-argument; all characters in  the
			     remainder of the option-argument shall be consid‐
			     ered part of the  format  string.	When  multiple
			     options  are  specified, the format strings shall
			     be	 considered  a	single,	 concatenated  string,
			     evaluated in command line order.

		      (Applicable only to the
			     format.)  When used in or mode, shall include and
			     extended header records for each file. See

		      In addition to these keywords, if the format  is	speci‐
		      fied,  any  of the keywords and values defined in can be
		      used in option-arguments, in either of two modes:

		      When used in
			     or	 mode,	these  keyword/value  pairs  shall  be
			     included  at  the	beginning  of  the  archive as
			     global extended header records. When used	in  or
			     mode,  these  keyword/value pairs shall act as if
			     they had been at the beginning of the archive  as
			     global extended header records.

		      When used in
			     or	 mode,	these  keyword/value  pairs  shall  be
			     included  as  records  at	the  beginning	of   a
			     extended  header  for  each  file. (This shall be
			     equivalent to the equal-sign form except that  it
			     creates  no global extended header records.) When
			     used in or mode, these keyword/value pairs	 shall
			     act  as  if  they were included as records at the
			     end of each extended  header;  thus,  they	 shall
			     override  any  global  or	file-specific extended
			     header record keywords of	the  same  names.  For
			     example,  in  the	command	 below, the group name
			     will be forced to a new value for all files  read
			     from the archive:

		      The  precedence  of  keywords over various fields in the
		      archive is described in

       Specifies one or more file characteristics
		      to be retained or discarded on  extraction.  The	string
		      argument consists of the characters and Multiple charac‐
		      teristics can be concatenated within the same string and
		      multiple flags can be specified. The specification flags
		      have the following meanings:

		      Does not retain file-access times.

		      Retains the user ID, group ID, access permission, access
			     time, and modification time.

		      Does not retain file-modification times.

		      Retains the user ID and the group ID.

		      Retains the access permission.

		      Note that "retain" means that an attribute stored in the
		      archive  is  given to the extracted file, subject to the
		      permissions of  the  invoking  process;  otherwise,  the
		      attribute	 is determined as part of the normal file cre‐
		      ation action.

		      If neither the nor the flag is specified, or the user ID
		      and  group ID are not retained, the command does not set
		      the and bits of the access permission. If the  retention
		      of  any of these items fails, the command writes a diag‐
		      nostic message to standard error. Failure to retain  any
		      of the items affects the exit status, but does not cause
		      the extracted file to be deleted. If specification flags
		      are  duplicated  or  conflict  with each other, the ones
		      given last shall take precedence.	 For  example,	if  is
		      specified, file-modification times are retained.

       Reads an archive file from the standard input.

       Modifies file-member or
		      archive-member  names  specified	by the pattern or file
		      arguments	 according  to	the  substitution   expression
		      replstr,	using the syntax of the command. The substitu‐
		      tion expression has the following format:

		      whereas in the command, old is a basic  regular  expres‐
		      sion  and new can contain an (ampersand), (n is a digit)
		      back references,	or  subexpression  matching.  The  old
		      string can also contain newline characters.

		      Any  non-null  character can be used as a delimiter (the
		      (slash) character is the delimiter in the previous  for‐
		      mat).  Multiple  flag  expressions can be specified; the
		      expressions are applied in the order  specified,	termi‐
		      nating  with  the	 first	successful  substitution.  The
		      optional trailing character performs as in the  command.
		      The  optional  trailing character causes successful sub‐
		      stitutions to be written to the  standard	 error.	 File-
		      member  or  archive-member  names that substitute to the
		      empty string are ignored when reading  and  writing  ar‐
		      chives.

       Causes the access times of the archived files to be
		      the same as they were before being read by the command.

       Ignores files that are older (having a less recent file modification
		      time) than a preexisting file or archive member with the
		      same name.

		      When extracting files (flag), an archive member with the
		      same  name  as a file in the file system is extracted if
		      the archive member is newer than the file.

		      When writing files to an archive file (flag), an archive
		      member  with  the same name as a file in the file system
		      is superseded if the file is newer than the archive mem‐
		      ber.

		      When  copying  files to a destination directory (flags),
		      the file in the destination hierarchy is replaced by the
		      file in the source hierarchy or by a link to the file in
		      the source hierarchy if the file in the source hierarchy
		      is newer.

       Writes information about the process. If neither the
		      or  flags are specified, the flag produces a verbose ta‐
		      ble of contents that resembles the output of  otherwise,
		      archive-member pathnames are written to standard error.

       Writes files to the standard output in the specified archive format.

       Specifies the output archive format. The
		      command recognizes the following formats:

		      Extended
			      interchange  format.  The default blocking value
			      for this format for  character  special  archive
			      files  is	 5120.	Blocking  values  from	512 to
			      32,256 in increments of 512 are supported.

		      The     interchange format. See IEEE  Std	 1003.1,  2003
			      Edition.	The default block size for this format
			      for character special  archive  files  shall  be
			      5120.  Blocking  values  from  512  to 32,256 in
			      increments of 512 are supported.

			      This is an extended format. The format should be
			      used  for	 archiving and extracting files having
			      one or more of the  following  properties:  size
			      8GB  or  more,  UID or GID greater than 2097151,
			      user or group names longer than  31  characters,
			      pathname longer than 256 characters or link name
			      longer than 100 characters.   Archives  of  this
			      format  are  reported  as	 "USTAR format archive
			      extended" in the and  mode  when	the  (verbose)
			      flag is specified in the command line.

		      Extended
			      interchange  format.  This is the default output
			      archive format.  The default blocking value  for
			      this  format for character special archive files
			      is 10240. Blocking values from 512 to 32,256  in
			      increments of 512 are supported.

		      Any  attempt  to	append	to an archive file in a format
		      different from the existing archive  format  causes  the
		      command to exit immediately with a nonzero exit status.

       When traversing the file hierarchy specified by a pathname, the
		      command  does  not  descend into directories that have a
		      different device ID.

       Prompts interactively for the disposition of each
		      file.  Substitutions specified by	 flags	are  performed
		      before  you are prompted for disposition.	 An EOF marker
		      or an input line starting with the character  causes  to
		      exit.   Otherwise,  an input line starting with anything
		      other than causes the file to  be	 ignored.   This  flag
		      cannot be used in conjunction with the flag.

   Option Interaction and Processing Order
       Specifying  more	 than  one of the mutually-exclusive options and shall
       not be considered an error and the last option specified	 shall	deter‐
       mine the behavior of the utility.

       The  flags  that	 operate  on the names of files or archive members and
       interact as follows.

       When extracting files flag), archive members are	 selected,  using  the
       modified	 names,	 according  to the user-specified pattern arguments as
       modified by the and flags.  Then, any and flags modify, in that	order,
       the  names  of  the selected files. The flag writes the names resulting
       from these modifications.

       When writing files to an archive file flag), or when copying files, the
       files  are  selected according to the user-specified pathnames as modi‐
       fied by the and flags. Then, any and flags modify, in that  order,  the
       names  resulting	 from  these modifications.  The flag writes the names
       resulting from these modifications.

       If both the and flags are specified, the command does  not  consider  a
       file selected unless it is newer than the file to which it is compared.

   Listing Member Files of Archived Files
       You can specify the command without the or flags with the or and flags,
       and with the pattern argument.

       If neither the or flags are included, lists the contents of the	speci‐
       fied archive, one file per line.

       If  the flag is specified, the listing is output in the command format.
       In the verbose listing lists hard link pathnames as follows:

       lists symbolic link pathnames as follows:

       In the case of hard links, pathname is the name of  the	file  that  is
       being  extracted, and linkname is the name of a file that appeared ear‐
       lier in the archive.

   Extracting Archive Files
       The flag can be specified with the or and flags, and  a	pattern	 argu‐
       ment.

   Writing Archive Files
       The  flag  can  be  specified with the or and flags and with file argu‐
       ments.

       If is specified, but no files are specified, standard  input  is	 used.
       If neither or are specified, standard input must be an archive file.

   Copying Files
       The  and flags can be specified with the or and flags and with the file
       arguments.  A directory argument must be specified.

   List Mode Format Specifications
       In mode with the format option, the format argument  shall  be  applied
       for  each selected file. The utility shall append a newline to the out‐
       put for each selected file. The format argument shall be	 used  as  the
       format  string  described  in  the  Base Definitions volume of IEEE Std
       1003.1-2001, Chapter 5, File Format Notation, with  the	exceptions  1.
       through 5. defined in the section of plus the following exceptions:

       1. through 5.  Defined in the section of

       6.  The	sequence  can occur before a format conversion specifier.  The
	   conversion argument is defined by the value of keyword.  The imple‐
	   mentation shall support the following keywords:

	   ·  Any of the Field Name entries in Header Block and Octet-Oriented
	      Archive Entry.

	   ·  Any keyword defined for the extended header in

	      For example, the sequence "%(charset)s" is the string  value  of
	      the  name of the character set in the extended header.  Refer to
	      the section for the list of keywords in each format.

	      The result of the keyword conversion argument shall be the value
	      from the applicable header field or extended header, without any
	      trailing NULL characters.

       7.  An additional conversion specifier  character,  shall  be  used  to
	   specify  time  formats.   The conversion specifier character can be
	   preceded by the sequence  where  subformat  is  a  date  format  as
	   defined  by	date  operands.	 The  default keyword shall be and the
	   default subformat shall be:

       8.  An additional conversion specifier  character,  shall  be  used  to
	   specify  the	 file mode string as defined in Standard Output. If is
	   omitted, the mode keyword shall be used. For	 example,  writes  the
	   single  character corresponding to the entry_type field of the com‐
	   mand

       9.  An additional conversion specifier  character,  shall  be  used  to
	   specify  the	 device for block or special files, if applicable.  If
	   not applicable, and is specified, then  this	 conversion  shall  be
	   equivalent  to If not applicable, and is omitted, then this conver‐
	   sion shall be equivalent to space.

       10. An additional conversion specifier  character,  shall  be  used  to
	   specify  a  pathname. The conversion character can be preceded by a
	   sequence of comma-separated keywords:

	   The values for all the keywords that are non-null shall be concate‐
	   nated  together,  each  separated by a '/'. The default shall be if
	   the keyword path is defined; otherwise, the default shall be

       11. An additional conversion specifier  character,  shall  be  used  to
	   specify  a  symbolic	 line expansion. If the current file is a sym‐
	   bolic link, then %L shall expand to:

	   Otherwise, the conversion specification shall be the equivalent of

EXTENDED DESCRIPTION
   cpio Interchange Format
       The octet-oriented archive format shall be a series  of	entries,  each
       comprising  a header that describes the file, the name of the file, and
       then the contents of the file.  The fields of the header are  described
       below:

       Identify the archive as being a transportable archive by containing the
		   identifying value "070707".

       Contains values that uniquely identify the file within the archive. No
		   files  contain  the same pair of and values unless they are
		   links to the same file.

       Contains the file type and access permissions.

       Contains the user ID of the owner of the file.

       Contains the group ID of the group owner of the file.

       Contains the number links of the file.

       Contains information for character or block special files.

       Contains the latest time of modification of the file at	the  time  the
       archive
		   was created.

       Contains	 the  length  of  the pathname, including the terminating NULL
       character.

       Contains the length of the file in bytes. This shall be the  length  of
       the
		   data section following the header structure.

   ustar Interchange Format
       A archive tape or file shall contain a series of logical records.  Each
       logical record shall be a fixed-size logical record of 512 bytes.  Each
       file  archived  shall  be  represented  by a header logical record that
       describes the file, followed by zero or more logical records that  give
       the contents of the file. At the end of the archive file there shall be
       two 512-octet logical records filled with binary zeros, interpreted  as
       an  end-of-archive  indicator.  The header logical record shall contain
       the following fields:

       The name and the prefix fields shall produce the pathname of the	 file.
       A new
		   pathname  shall be formed, if prefix is not an empty string
		   (its first character is not NULL), by concatenating	prefix
		   (up	to  the	 first NULL character), a slash character, and
		   name; otherwise, name is used alone. In this manner,	 path‐
		   names  up to 256 characters can be supported. If a pathname
		   does not fit in the space provided, shall notify  the  user
		   of  the  error,  and	 shall not store any part of the file-
		   header or data on the medium.

       The mode field provides 12 bits encoded in the ISO/IEC  646:1991	 stan‐
       dard octal
		   digit representation to encode the permissions.

       The user and group ID of the owner and group of the
		   file,  respectively. If or is greater than 2097151, a value
		   of -1 will be stored in the respective field of the header.
		   If the corresponding name (user name for uid and group name
		   for gid) also could not be stored  in  the  archive,	 shall
		   notify  the	user  of the error but shall include the other
		   attributes of the file and its data on the medium.

       The names of the owner and group of the file, respectively. If the user
       or group
		   name is longer than 31 characters, it will not be stored in
		   the respective field of the header.	shall notify the  user
		   of  the error but shall include the other attributes of the
		   file and its data on the medium.

       The size of the file in bytes. If the size of the files is greater than
       or equal to
		   8GB,	 shall	notify	the  user  of the error, and shall not
		   store any part of the file-header or data on the medium.

       The modification time of the file at the time it was archived.

       Specifies the type of file archived.  All of the
		   fields shall be coded in the ISO/IEC 646:1991 standard IRV

		   Represents a regular file.

		   Represents a file linked to another file, of any type, pre‐
		   viously archived. The
			  linked-to  name  is  specified  in  the field with a
			  NULL-character terminator if it  is  less  than  100
			  bytes in length.

		   Represents  a  symbolic  link. The contents of the symbolic
		   link shall be stored
			  in the field.

		   Represents character special files and block special	 files
		   respectively.

		   Specifies a directory or subdirectory.

		   Specifies a FIFO special file. Note that the archiving of a
		   FIFO file archives
			  the existence of this file and not its contents.

       The	   is the pathname of the target of a symbolic or  hard	 link.
		   It  is  limited to 100 characters. If the name does not fit
		   in the space provided, shall notify the user of the	error,
		   and shall not attempt to store the link on the medium.

       When the	   field  contains '3' or '4' the and fields shall contain the
		   major and minor numbers of the device respectively.

       The octal value of the simple sum of all bytes in  the  header  logical
       record.
		   Each	 bytes	in  the header shall be treated as an unsigned
		   value.  When calculating the checksum, the field is treated
		   as if it were all spaces.

       The  magic  field  is the specification that this archive was output in
       this archive
		   format. If this field contains (the	five  characters  from
		   the	ISO/IEC 646:1991 standard IRV shown followed by NULL),
		   the uname  and  gname  fields  shall	 contain  the  ISO/IEC
		   646:1991 standard IRV representation of the owner and group
		   of the file, respectively.  When the file is restored by  a
		   privileged,	protection-preserving  version of the utility,
		   the user and group databases shall  be  scanned  for	 these
		   names.  If  found,  the user and group IDs contained within
		   these files shall be used rather than the values  contained
		   within the uid and gid fields.

       The  version  field  is two bytes containing the characters "00" (zero-
       zero).

   pax Interchange Format
       A archive tape or file produced in the format shall contain a series of
       blocks.	The  physical  layout of the archive shall be identical to the
       ustar format described in Each file archived shall  be  represented  by
       the following sequence:

       1.  An  optional header block with extended header records. This header
	   is of the form described in with a value of or The extended	header
	   records, described in shall be included as the data for this header
	   block.

       2.  A header block that describes the file. Any fields in the preceding
	   optional  extended  header  shall override the associated fields in
	   this header block for this file.

       3.  Zero or more blocks that contain the contents of the file.

       At the end of the archive file  there  shall  be	 two  512-byte	blocks
       filled with binary zeros, interpreted as an end-of-archive indicator.

   pax Header Block
       The  header  block  shall be identical to the header block described in
       except that two additional typeflag values are defined:

       Represents extended header records for the following file  in  the  ar‐
       chive (which
		   shall  have	its  own  header  block).  The format of these
		   extended header records shall be as described in  the  sec‐
		   tion of this manpage.

       Represents  global  extended  header records for the following files in
       the archive.
		   The format of these extended header	records	 shall	be  as
		   described  in  Each value shall affect all subsequent files
		   that do not override	 that  value  in  their	 own  extended
		   header  record  and	until  another	global extended header
		   record is reached that provides another value for the  same
		   field.  The	global	headers should not be used with inter‐
		   change media that could suffer partial data loss in	trans‐
		   porting the archive.

       For  both  of  these  types,  the  size	field shall be the size of the
       extended header records in bytes. The other fields in the header	 block
       are not meaningful to this version of the pax utility.

       A  further  difference  from  the  header block is that data blocks for
       files of typeflag 1 (the digit one) (hard link) may be included,	 which
       means  that  the size field may be greater than zero.  Archives created
       by shall include these data blocks with the hard links.

   pax Extended Header
       A extended header contains values that are inappropriate for the header
       block  because  of limitations in that format: fields representing file
       attributes not described in the header,	and  fields  whose  format  or
       length  do  not	fit  the  requirements of the header. The values in an
       extended header add attributes to the following file (or files; see the
       description  of	the  header block) or override values in the following
       header block(s), as indicated in the following list of keywords.

       An extended header shall consist of one	or  more  records,  each  con‐
       structed as follows:

       The  keyword field shall be one of the entries from the following list.
       A keyword shall not include an equals sign. In the following list,  the
       notations  "file(s)"  or "block(s)" are used to acknowledge that a key‐
       word affects the following single file after  a	extended  header,  but
       possibly	 multiple  files  after	 Any  requirements  in the list for to
       include a record when in or mode shall apply only when  such  a	record
       has  not already been provided through the use of the option. When used
       in mode, shall behave as if an archive had been created with applicable
       extended header records and then extracted.

       The file access time for the following file(s), equivalent to the value
       of the
		   member of the structure for a file,	as  described  by  the
		   function. The format of the value shall be as described in

       A series of characters used as a comment. All characters in the
		   value field shall be ignored by

       The  group  ID  of the group that owns the file, expressed as a decimal
       number
		   using digits	 from  the  ISO/IEC  646:1991  standard.  This
		   record  shall  override  the	 field in the following header
		   block(s). When used in or mode, shall  include  a  extended
		   header  record for each file whose group ID is greater than
		   2097151 (octal 7777777).

       The group of the file(s), formatted as a group name in the group	 data‐
       base.
		   This	 record shall override the and fields in the following
		   header block(s), and any extended header record. When  used
		   in or mode, shall include a extended header record for each
		   file whose group name cannot be represented in the header.

       The pathname of a link being created to another file, of any type, pre‐
       viously
		   archived.  This record shall override the field in the fol‐
		   lowing header block(s). The following  header  block	 shall
		   determine the type of link created. If typeflag of the fol‐
		   lowing header block is 1, it shall be a hard link. If type‐
		   flag	 is 2, it shall be a symbolic link and the value shall
		   be the contents of the symbolic link. When used in or mode,
		   shall  include a extended header record for each link whose
		   pathname cannot be represented in the header.

       The file modification time of the following file(s), equivalent to  the
       value of
		   the member of the structure for a file, as described in the
		   function. This record shall override the field in the  fol‐
		   lowing  header  block(s).  The  modification	 time shall be
		   restored if	the  process  has  the	appropriate  privilege
		   required to do so.  The format of the value is described in

       The pathname of the following file(s). This record shall override the
		   and	fields	in the following header block(s). When used in
		   or mode, pax shall include a	 extended  header  record  for
		   each	 file whose pathname cannot be represented entirely in
		   the header.

       The size of the file in bytes, expressed as a decimal number using dig‐
       its
		   from the ISO/IEC 646:1991 standard. This record shall over‐
		   ride the field in the following header block(s). When  used
		   in or mode, shall include a extended header record for each
		   file with a	size  value  greater  than  8589934591	(octal
		   77777777777).

       The user ID of the file owner, expressed as a decimal number using dig‐
       its
		   from the ISO/IEC 646:1991 standard. This record shall over‐
		   ride	 the field in the following header block(s). When used
		   in or mode, shall include a extended header record for each
		   file	  whose	 owner	ID  is	greater	 than  2097151	(octal
		   7777777).

       The owner of the following file(s), formatted as a  user	 name  in  the
       user
		   database.  This record shall override the and fields in the
		   following header block(s), and any extended header  record.
		   When	 used  in  or  mode,  shall  include a extended header
		   record for each file whose user name cannot be  represented
		   entirely in the header.

       Indicates  that	the optional ACL entry for the file has been backed up
       for HFS
		   files and its value will be equal to	 1.   This  record  is
		   written to the extended header if option is specified while
		   creating the archive, the HFS file has optional ACL entries
		   and the ACL entries are good.

       Indicates  that	the optional ACL entry for the file has been backed up
       for JFS
		   files and its value will be equal to	 1.   This  record  is
		   written to the extended header if option is specified while
		   creating the archive, the JFS file has optional ACL entries
		   and the ACL entries are good.

       The  number  of	ACL  entries  that  have  been written to the extended
       header.
		   This is common to both HFS and JFS.	This record is written
		   to  the extended header if option is specified while creat‐
		   ing the archive, the JFS file has optional ACL entries  and
		   the ACL entries are good.

       The ACL entries for the file.
		   This	 record is written to the extended header if option is
		   specified while creating the archive, the file has optional
		   ACL	entries	 and the ACL entries are good.	The format for
		   HFS ACL entries will be:

		   The format for JFS ACL entries will be:

		   However,  the  corresponding	 username/groupname   of   the
		   uid/gid are written to the header.

       If  the	value  field  is zero length, it shall delete any header block
       field, previously entered extended header  value,  or  global  extended
       header value of the same name.

       If  a  keyword  in  an extended header record (or in a option-argument)
       overrides or deletes a corresponding field in the header	 block,	 shall
       ignore the contents of that header block field.

       Unlike  the  header  block  fields, NULLs shall not delimit values; all
       characters within the value field shall	be  considered	data  for  the
       field.  None  of	 the  length limitations of the header block fields in
       shall apply to the extended header records.

   pax Extended Header Keyword Precedence
       This section describes the  precedence  in  which  the  various	header
       records	and fields and command line options are selected to apply to a
       file in the archive. When is used in or modes,  it  shall  determine  a
       file attribute in the following sequence:

       1.  If  keyword-prefix is used, the affected attributes shall be deter‐
	   mined from Step 7., if applicable, or ignored otherwise.

       2.  If is used, the affected attributes shall be ignored.

       3.  If is used, the affected attribute shall be assigned the value.

       4.  If there is a extended header record, the affected attribute	 shall
	   be  assigned the value.  When extended header records conflict, the
	   last one given in the header shall take precedence.

       5.  If is used, the affected attribute shall be assigned the value.

       6.  If there is a global extended header record, the affected attribute
	   shall  be  assigned the value.  When global extended header records
	   conflict, the last one given in the global header shall take prece‐
	   dence.

       7.  Otherwise, the attribute shall be determined from the header block.

   pax Extended Header File Times
       The  utility  shall  write  an  record for each file in or modes if the
       file's modification time cannot be represented exactly  in  the	header
       logical record described in This can occur if the time is out of range,
       or if the file system of the underlying	implementation	supports  non-
       integer time granularities and the time is not an integer. All of these
       time records shall be formatted as a decimal representation of the time
       in  seconds  since  the	Epoch.	If a period decimal point character is
       present, the digits to the right of the point shall represent the units
       of  a sub second timing granularity, where the first digit is tenths of
       a second and each subsequent digit is a tenth of the previous digit.

RETURN VALUE
       The command returns a value of 0 (zero) if all files were  successfully
       processed; otherwise, returns a value greater than 0 (zero).

EXAMPLES
       To copy the contents of the current directory to the tape drive, enter:

       To copy the directory hierarchy to enter:

       To  read	 the archive with all files rooted in the directory in the ar‐
       chive extracted relative to the current directory, enter:

       All of the preceding examples create archives in format.

       The following pairs of commands demonstrate conversions from and to  In
       all  cases, the examples show comparable command-line usage rather than
       identical output formats.  The flag can be specified  to	 the  commands
       shown here, producing archives to select specific output formats:

       Note:  When  you use the flag (interactively renames files) on files to
       which there are hard links, does	 create	 hard  links  to  the  renamed
       files.

WARNINGS
       Because of industry standards and interoperability goals, does not sup‐
       port the archival of files of size 8GB or larger for both and  formats.
       Also,  does  not	 support  user	and group IDs greater than or equal to
       2048K for format.  does not support user and group IDs greater than  or
       equal  to  256K	for  format.  With format, files with user IDs greater
       than or equal to 2048K are restored under the user ID  of  the  current
       process,	 unless	 the user name exists. The same applies for group IDs.
       In format, files with user or group IDs greater than or equal  to  256K
       will  not  be  recovered	 with  the original user or group IDs, respec‐
       tively.

       will automatically determine a block size only up to 32,768  on	input.
       By  default,  archives created with more than 32,768 block size will be
       read in terms of 32,768 block size.

       removes the and characters from the archive-member names wherever  they
       are  not	 needed	 to address the file.  For instance, will be stored as
       but will be stored as

AUTHOR
       was developed by Mark H. Colburn, OSF, and HP.

SEE ALSO
       ed(1), tar(4), disk(7), mt(7).

STANDARDS CONFORMANCE
									pax(1)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net