734 lines
28 KiB
HTML
734 lines
28 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>pax - Portable archive interchange</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
|
|
|
|
<h2>pax - Portable archive interchange</h2>
|
|
|
|
<p><strong>Synopsis</strong></p>
|
|
|
|
<p><strong>pax [-cdnv] [-E</strong> <em>limit</em><strong>]
|
|
[-f</strong> <em>archive</em><strong>] [-s</strong> <em>
|
|
replstr</em><strong> ...] [-U</strong> <em>user</em><strong> ...]
|
|
[-G</strong> <em>group</em><strong> ...] [-T</strong>
|
|
[<em>from_date</em>][<em>,to_date</em><strong>] ...] [</strong><em>pattern</em>
|
|
<strong>...]</strong></p>
|
|
|
|
<p><strong>pax -r [-cdiknuvDYZ] [-C</strong> <em>ccsid</em>
|
|
<strong>] [-E</strong> <em>limit</em><strong>] [-f</strong> <em>
|
|
archive</em><strong>] [-o</strong> <em>options</em><strong> ...]
|
|
[-p</strong> <em>string</em><strong> ...] [-s</strong> <em>
|
|
replstr</em><strong> ...] [-U</strong> <em>user</em><strong> ...]
|
|
[-G</strong> <em>group</em><strong> ...] [-T</strong>
|
|
[<em>from_date</em>][<em>,to_date</em>]<strong> ...]</strong>
|
|
[<em>pattern</em> <strong>...]</strong></p>
|
|
|
|
<p><strong>pax -w [-dituvHLPX] [-b</strong> <em>
|
|
blocksize</em><strong>] [[-a] [-f</strong> <em>
|
|
archive</em><strong>]] [-x</strong> <em>format</em><strong>]
|
|
[-B</strong> <em>bytes</em><strong>] [-s</strong> <em>
|
|
replstr</em><strong> ...] [-o</strong> <em>options</em><strong> ...]
|
|
[-U</strong> <em>user</em><strong> ...] [-G</strong> <em>
|
|
group</em><strong> ...] [-T</strong>
|
|
[<em>from_date</em>][<em>,to_date</em>]<strong>[/[c][m]] ...]
|
|
</strong> [<em>file</em> <strong>...]</strong></p>
|
|
|
|
<p><strong>pax -r -w [-diklntuvDHLPXYZ] [-p</strong> <em>
|
|
string</em><strong> ...] [-s</strong> <em>replstr</em><strong> ...]
|
|
[-U</strong> <em>user</em><strong> ...] [-G</strong> <em>
|
|
group</em><strong> ...] [-T</strong>
|
|
[<em>from_date</em>][<em>,to_date</em>]<strong>[/[c][m]] ...]
|
|
[</strong><em>file</em> <strong>...]</strong> <em>directory</em></p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>The <strong>pax</strong> utility reads, writes, and lists the
|
|
members of an archive file, and copies directory hierarchies.
|
|
<strong>pax</strong> operation is independent of the specific
|
|
archive format, and supports a wide variety of different archive
|
|
formats. A list of supported archive formats can be found under the
|
|
description of the <strong>-x</strong> option.</p>
|
|
|
|
<p>The presence of the <strong>-r</strong> and the <strong>
|
|
-w</strong> options specifies which of the following functional
|
|
modes <strong>pax</strong> will operate under: list, read, write,
|
|
and copy.</p>
|
|
|
|
<dl>
|
|
<dt><strong><none>List</strong></dt>
|
|
|
|
<dd><strong>pax</strong> writes a table of contents of the members
|
|
of the archive file read from whose path names match the specified
|
|
patterns. The table of contents contains one file name per line and
|
|
is written using single line buffering.</dd>
|
|
|
|
<dt><strong>-r Read</strong></dt>
|
|
|
|
<dd><strong>pax</strong> extracts the members of the archive file
|
|
read from the with path names matching the specified <em>
|
|
patterns</em>. The archive format and blocking is automatically
|
|
determined on input. When an extracted file is a directory, the
|
|
entire file hierarchy rooted at that directory is extracted. All
|
|
extracted files are created relative to the current file hierarchy.
|
|
The setting of ownership, access and modification times, and file
|
|
mode of the extracted files are discussed in more detail under the
|
|
<strong>-p</strong> option.</dd>
|
|
|
|
<dt><strong>-w Write</strong></dt>
|
|
|
|
<dd><strong>pax</strong> writes an archive containing the <em>
|
|
file</em> operands to standard output using the specified archive
|
|
<em>format</em>. When no <em>file</em> operands are specified, a
|
|
list of files to copy with one per line is read from standard
|
|
input. When a <em>file</em> operand is also a directory, the entire
|
|
file hierarchy rooted at that directory will be included.</dd>
|
|
|
|
<dt><strong>-r -w Copy</strong></dt>
|
|
|
|
<dd><strong>pax</strong> copies the <em>file</em> operands to the
|
|
destination <em>directory</em>. When no <em>file</em> operands are
|
|
specified, a list of files to copy with one per line is read from
|
|
standard input. When a <em>file</em> operand is also a directory
|
|
the entire file hierarchy rooted at that directory will be
|
|
included. The effect of the copy is 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 (see the <strong>-l</strong> option below).</dd>
|
|
</dl>
|
|
|
|
<table>
|
|
<tr>
|
|
<td valign="top"><strong>Warning:</strong></td>
|
|
<td>The destination <em>directory</em> must not be one of the <em>
|
|
file</em> operands or a member of a file hierarchy rooted at one of
|
|
the file operands. The result of a copy under these conditions is
|
|
unpredictable.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table>
|
|
<tr>
|
|
<td valign="top"><strong>Note:</strong></td>
|
|
<td>Archive files must be in CCSID 819 for portability with other
|
|
platforms.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>While processing a damaged archive during a read or list
|
|
operation, <strong>pax</strong> will attempt to recover from media
|
|
defects and will search through the archive to locate and process
|
|
the largest number of archive members possible (see the <strong>
|
|
-E</strong> option for more details on error handling).</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<dl>
|
|
<dt><strong>-r</strong></dt>
|
|
|
|
<dd>Read an archive file from standard input and extract the
|
|
specified <em>files</em>. If any intermediate directories are
|
|
needed in order to extract an archive member, these directories
|
|
will be created as if <strong>mkdir</strong> was called with the
|
|
bitwise inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO as the mode
|
|
argument. When the selected archive <em>format</em> supports the
|
|
specification of linked files and these files cannot be linked
|
|
while the archive is being extracted, <strong>pax</strong> will
|
|
write a diagnostic message to standard error and exit with a
|
|
nonzero exit status at the completion of operation.</dd>
|
|
|
|
<dt><strong>-w</strong></dt>
|
|
|
|
<dd>Write files to the standard output in the specified archive
|
|
<em>format</em>. When no <em>file</em> operands are specified,
|
|
standard input is read for a list of path names with one per line
|
|
without any leading or trailing <blanks>.</dd>
|
|
|
|
<dt><strong>-a</strong></dt>
|
|
|
|
<dd>Append files to the end of an archive that was previously
|
|
written. If an archive <em>format</em> is not specified with a
|
|
<strong>-x</strong> option, the format currently being used in the
|
|
archive will be selected. Any attempt to append to an archive in a
|
|
format different from the format already used in the archive will
|
|
cause <strong>pax</strong> to exit immediately with a non-zero exit
|
|
status. The blocking size used in the archive volume where writing
|
|
starts will continue to be used for the remainder of that archive
|
|
volume.</dd>
|
|
|
|
<dt><strong>-b</strong> <em>blocksize</em></dt>
|
|
|
|
<dd>When writing an archive, block the output at a positive decimal
|
|
integer number of bytes per write to the archive file. The <em>
|
|
blocksize</em> must be a multiple of 512 bytes with a maximum of
|
|
32256 bytes. A <em>blocksize</em> can end with k or b to specify
|
|
multiplication by 1024 (1K) or 512. A pair of <em>
|
|
blocksizes</em> can be separated by x to indicate a product. When
|
|
blocking is not specified, the default blocksize is dependent on
|
|
the specific archive format being used (see the <strong>-x</strong>
|
|
option).</dd>
|
|
|
|
<dt><strong>-c</strong></dt>
|
|
|
|
<dd>Match all file or archive members except those specified by the
|
|
<em>pattern</em> and <em>file</em> operands.</dd>
|
|
|
|
<dt><strong>-d</strong></dt>
|
|
|
|
<dd>Cause files of type directory being copied or archived, or
|
|
archive members of type directory being extracted, to match only
|
|
the directory file or archive member and not the file hierarchy
|
|
rooted at the directory.</dd>
|
|
|
|
<dt><strong>-f</strong> <em>archive</em></dt>
|
|
|
|
<dd>Specify <em>archive</em> as the path name of the input or output
|
|
archive, overriding the default standard input (for list and read)
|
|
or standard output (for write). A single archive may span multiple
|
|
files and different archive devices. When required, <strong>
|
|
pax</strong> will prompt for the path name of the file or device of
|
|
the next volume in the archive.</dd>
|
|
|
|
<dt><strong>-i</strong></dt>
|
|
|
|
<dd>Interactively rename files or archive members. For each archive
|
|
member matching a <em>pattern</em> operand or each file matching a
|
|
<em>file</em> operand, <strong>pax</strong> will prompt to the
|
|
terminal giving the name of the file, its file mode and its
|
|
modification time. <strong>pax</strong> then reads a line from the
|
|
terminal. If this line is blank, the file or archive member is
|
|
skipped. If this line consists of a single period, the file or
|
|
archive member is processed with no modification to its name.
|
|
Otherwise, its name is replaced with the contents of the line.
|
|
<strong>pax</strong> will immediately exit with a non-zero exit
|
|
status if EOF is encountered when reading a response.
|
|
If the LC_TIME environment
|
|
variable is set, the modification time is formatted using
|
|
the format specified by the d_t_fmt keyword in the LC_TIME category
|
|
of the specified locale.</dd>
|
|
|
|
<dt><strong>-k</strong></dt>
|
|
|
|
<dd>Do not overwrite existing files.</dd>
|
|
|
|
<dt><strong>-l</strong></dt>
|
|
|
|
<dd>(The lowercase letter ell) Link files. In the copy mode ( -r
|
|
-w), hard links are made between the source and destination file
|
|
hierarchies whenever possible.</dd>
|
|
|
|
<dt><strong>-n</strong></dt>
|
|
|
|
<dd>Select the first archive member that matches each <em>
|
|
pattern</em> operand. No more than one archive member is matched
|
|
for each <em>pattern</em>. When members of type directory are
|
|
matched, the file hierarchy rooted at that directory is also
|
|
matched (unless <strong>-d</strong> is also specified).</dd>
|
|
|
|
<dt><strong>-o</strong></dt>
|
|
|
|
<dd>Information to modify the algorithm for extracting or writing
|
|
archive files which is specific to the archive format specified by
|
|
<strong>-x</strong>. In general, options take the form:
|
|
name=value.</dd>
|
|
|
|
<dt><strong>-p</strong> <em>string</em></dt>
|
|
|
|
<dd>Specify one or more file characteristic options (privileges).
|
|
The <em>string</em> is a string specifying file characteristics to
|
|
be retained or discarded on extraction. The string consists of the
|
|
specification characters a, e, m, o, and p. Multiple
|
|
characteristics can be concatenated within the same string and
|
|
multiple <strong>-p</strong> options can be specified. The meaning
|
|
of the specification characters are as follows:
|
|
|
|
<dl>
|
|
<dt><strong>a</strong></dt>
|
|
|
|
<dd>Do not preserve file access times. By default, file access
|
|
times are preserved whenever possible.</dd>
|
|
|
|
<dt><strong>e</strong></dt>
|
|
|
|
<dd>Preserve everything, the user ID, group ID, file mode bits,
|
|
file access time, and file modification time. This is intended to
|
|
be used by someone with all the appropriate privileges in order to
|
|
preserve all aspects of the files as they are recorded in the
|
|
archive. The e flag is the sum of the o and p flags.</dd>
|
|
|
|
<dt><strong>m</strong></dt>
|
|
|
|
<dd>Do not preserve file modification times. By default, file
|
|
modification times are preserved whenever possible.</dd>
|
|
|
|
<dt><strong>o</strong></dt>
|
|
|
|
<dd>Preserve the user ID and group ID.</dd>
|
|
|
|
<dt><strong>p</strong></dt>
|
|
|
|
<dd>Preserve the file mode bits. This intended to be used by a user
|
|
with regular privileges who wants to preserve all aspects of the
|
|
file other than the ownership. The file times are preserved by
|
|
default, but two other flags are offered to disable this and use
|
|
the time of extraction instead.</dd>
|
|
</dl>
|
|
|
|
<p>In the preceding list, preserve indicates that an attribute
|
|
stored in the archive is given to the extracted file, subject to
|
|
the permissions of the invoking process. Otherwise the attribute of
|
|
the extracted file is determined as part of the normal file
|
|
creation action. If the preservation of any of these items fails
|
|
for any reason, <strong>pax</strong> will write a diagnostic
|
|
message to standard error. Failure to preserve these items affects
|
|
the final exit status, but will not cause the extracted file to be
|
|
deleted. If the file characteristic letters in any of the <em>
|
|
strings</em> are duplicated or conflict with each other, the one
|
|
given last will take precedence. For example, if <strong>-p
|
|
eme</strong> is specified, file modification times are still
|
|
preserved.</p>
|
|
</dd>
|
|
|
|
<dt><strong>-s</strong></dt>
|
|
|
|
<dd>Modify the file or archive member names specified by the <em>
|
|
pattern</em> or <em>file</em> operands according to the
|
|
substitution expression <em>replstr</em>, using the syntax of the
|
|
regular expressions. The format of these regular expressions are:
|
|
|
|
<pre>
|
|
/old/new/[gp]
|
|
</pre>
|
|
|
|
<p>Old is a basic regular expression and new can contain an
|
|
ampersand (&), n (where n is a digit) back-references, or
|
|
subexpression matching. The old string may also contain
|
|
<newline> characters. Any non-null character can be used as a
|
|
delimiter (/ is shown here). Multiple <strong>-s</strong>
|
|
expressions can be specified. The expressions are applied in the
|
|
order they are specified on the command line, terminating with the
|
|
first successful substitution. The optional trailing g continues to
|
|
apply the substitution expression to the path name substring which
|
|
starts with the first character following the end of the last
|
|
successful substitution. The first unsuccessful substitution stops
|
|
the operation of the g option. The optional trailing p will cause
|
|
the final result of a successful substitution to be written to
|
|
standard error in the following format:</p>
|
|
|
|
<pre>
|
|
<original path name> >> <new path name>
|
|
</pre>
|
|
|
|
<p>File or archive member names that substitute to the empty string
|
|
are not selected and will be skipped.</p>
|
|
</dd>
|
|
|
|
<dt><strong>-t</strong></dt>
|
|
|
|
<dd>Reset the access times of any file or directory read or
|
|
accessed by <strong>pax</strong> to be the same as they were before
|
|
being read or accessed by <strong>pax</strong>.</dd>
|
|
|
|
<dt><strong>-u</strong></dt>
|
|
|
|
<dd>Ignore files that are older (having a less recent file
|
|
modification time) than a pre-existing file or archive member with
|
|
the same name. During read, an archive member with the same name as
|
|
a file in the file system will be extracted if the archive member
|
|
is newer than the file. During write, a file system member with the
|
|
same name as an archive member will be written to the archive if it
|
|
is newer than the archive member. During copy, 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.</dd>
|
|
|
|
<dt><strong>-v</strong></dt>
|
|
|
|
<dd>During a list operation, produce a verbose table of contents
|
|
using the format of the <strong>ls</strong> utility with the
|
|
<strong>-l</strong> option. For path names representing a hard link
|
|
to a previous member of the archive, the output has the format:
|
|
<ls -l listing> == <link name> For path names
|
|
representing a symbolic link, the output has the format: <ls -l
|
|
listing> = ><link name> Where <ls -l listing> is
|
|
the output format specified by the <strong>ls</strong> utility when
|
|
used with the <strong>-l</strong> option. Otherwise for all the
|
|
other operational modes ( read, write, and copy), path names are
|
|
written and flushed to standard error without a trailing newline as
|
|
soon as processing begins on that file or archive member. The
|
|
trailing newline is not buffered, and is written only after the
|
|
file has been read or written.
|
|
If the LC_TIME environment
|
|
variable is set, the output time is formatted using
|
|
the format specified by the d_t_fmt keyword in the LC_TIME category
|
|
of the specified locale.</dd>
|
|
|
|
|
|
<dt><strong>-x</strong></dt>
|
|
|
|
<dd>Specify the output archive format, with the default format
|
|
being ustar. <strong>pax</strong> currently supports the following
|
|
formats:
|
|
|
|
<dl>
|
|
<dt><strong>cpio</strong></dt>
|
|
|
|
<dd>The extended cpio interchange format specified in the 1003.2
|
|
standard. The default blocksize for this format is 5120 bytes.</dd>
|
|
|
|
<dt><strong>bcpio</strong></dt>
|
|
|
|
<dd>The old binary cpio format. The default blocksize for this
|
|
format is 5120 bytes. This format is not very portable and should
|
|
not be used when other formats are available.</dd>
|
|
|
|
<dt><strong>sv4cpio</strong></dt>
|
|
|
|
<dd>The System V release 4 cpio. The default blocksize for this
|
|
format is 5120 bytes.</dd>
|
|
|
|
<dt><strong>sv4crc</strong></dt>
|
|
|
|
<dd>The System V release 4 cpio with file crc checksums. The
|
|
default blocksize for this format is 5120 bytes.</dd>
|
|
|
|
<dt><strong>tar</strong></dt>
|
|
|
|
<dd>The old BSD tar format as found in BSD4.3. The default
|
|
blocksize for this format is 10240 bytes. Path names stored by this
|
|
format must be 100 characters or less in length. Only regular
|
|
files, hard links, soft links, and directories will be archived
|
|
(other file system types are not supported). For backward
|
|
compatibility with even older tar formats, a <strong>-o</strong>
|
|
option can be used when writing an archive to omit the storage of
|
|
directories. This option takes the form: <tt>-o -Cm
|
|
-write_opt=nodir</tt></dd>
|
|
|
|
<dt><strong>ustar</strong></dt>
|
|
|
|
<dd>The extended tar interchange format specified in the 1003.2
|
|
standard. The default blocksize for this format is 10240 bytes.
|
|
Path names stored by this format must be 250 characters or less in
|
|
length.</dd>
|
|
</dl>
|
|
|
|
<p><strong>pax</strong> will detect and report any file that it is
|
|
unable to store or extract as the result of any specific archive
|
|
format restrictions. The individual archive formats may impose
|
|
additional restrictions on use. Typical archive format restrictions
|
|
include (but are not limited to): file path name length, file size,
|
|
link path name length and the type of the file.</p>
|
|
</dd>
|
|
|
|
<dt><strong>-A</strong></dt>
|
|
|
|
<dd>Run <strong>pax</strong> as old tar.</dd>
|
|
|
|
<dt><strong>-B</strong></dt>
|
|
|
|
<dd>Limit the number of bytes written to a single archive volume to
|
|
bytes. The bytes limit can end with m, k, or b to specify
|
|
multiplication by 1048576 (1M), 1024 (1K) or 512. A
|
|
pair of bytes limits can be separated by x to indicate a
|
|
product.</dd>
|
|
|
|
<dt><strong>-C</strong> <em>ccsid</em></dt>
|
|
|
|
<dd>Create the files extracted from the archive in the specified
|
|
<em>ccsid</em>. There must be a valid translation from CCSID 819 to
|
|
the specified <em>ccsid</em>. This option overrides the value of
|
|
the QIBM_CCSID environment variable.</dd>
|
|
|
|
<dt><strong>-D</strong></dt>
|
|
|
|
<dd>This option is the same as the <strong>-u</strong> option,
|
|
except that the file inode change time is checked instead of the
|
|
file modification time. The file inode change time can be used to
|
|
select files whose inode information (for example, uid, gid, and so on) is newer
|
|
than a copy of the file in the destination directory.</dd>
|
|
|
|
<dt><strong>-E</strong></dt>
|
|
|
|
<dd>Limit the number of consecutive read faults while trying to
|
|
read a flawed archives. With a positive limit, <strong>pax</strong>
|
|
will attempt to recover from an archive read error and will
|
|
continue processing starting with the next file stored in the
|
|
archive. A limit of 0 will cause <strong>pax</strong> to stop
|
|
operation after the first read error is detected on an archive
|
|
volume. A limit of NONE will cause <strong>pax</strong> to attempt
|
|
to recover from read errors forever. The default limit is a small
|
|
positive number of retries.
|
|
|
|
<table>
|
|
<tr>
|
|
<td valign="top"><strong>Warning:</strong></td>
|
|
<td>Using this option with NONE should be used with extreme caution
|
|
as <strong>pax</strong> may get stuck in an infinite loop on a very
|
|
badly flawed archive.</td>
|
|
</tr>
|
|
</table>
|
|
</dd>
|
|
|
|
<dt><strong>-G</strong></dt>
|
|
|
|
<dd>Select a file based on its group name, or when starting with a
|
|
#, a numeric gid. A '' can be used to escape the #. Multiple -G
|
|
options may be supplied and checking stops with the first
|
|
match.</dd>
|
|
|
|
<dt><strong>-H</strong></dt>
|
|
|
|
<dd>Follow only command line symbolic links while performing a
|
|
physical file system traversal.</dd>
|
|
|
|
<dt><strong>-L</strong></dt>
|
|
|
|
<dd>Follow all symbolic links to perform a logical file system
|
|
traversal.</dd>
|
|
|
|
<dt><strong>-P</strong></dt>
|
|
|
|
<dd>Do not follow symbolic links, perform a physical file system
|
|
traversal. This is the default mode.</dd>
|
|
|
|
<dt><strong>-T</strong></dt>
|
|
|
|
<dd>Allow files to be selected based on a file modification or
|
|
inode change time falling within a specified time range of <em>
|
|
from_date</em> to <em>to_date</em> (the dates are inclusive). If
|
|
only a <em>from_date</em> is supplied, all files with a
|
|
modification or inode change time equal to or younger are selected.
|
|
If only a <em>to_date</em> is supplied, all files with a
|
|
modification or inode change time equal to or older will be
|
|
selected. When the <em>from_date</em> is equal to the <em>
|
|
to_date</em>, only files with a modification or inode change time
|
|
of exactly that time will be selected.
|
|
|
|
<p>When <strong>pax</strong> is in the write or copy mode, the
|
|
optional trailing field [c][m] can be used to determine which file
|
|
time (inode change, file modification or both) are used in the
|
|
comparison. If neither is specified, the default is to use file
|
|
modification time only. The m specifies the comparison of file
|
|
modification time (the time when the file was last written). The c
|
|
specifies the comparison of inode change time (the time when the
|
|
file inode was last changed; for example, a change of owner, group, mode,
|
|
and so on). When c and m are both specified, then the modification and
|
|
inode change times are both compared. The inode change time
|
|
comparison is useful in selecting files whose attributes were
|
|
recently changed or selecting files which were recently created and
|
|
had their modification time reset to an older time (as what happens
|
|
when a file is extracted from an archive and the modification time
|
|
is preserved). Time comparisons using both file times is useful
|
|
when <strong>pax</strong> is used to create a time based
|
|
incremental archive (only files that were changed during a
|
|
specified time range will be archived).</p>
|
|
|
|
<p>A time range is made up of seven different fields and each field
|
|
must contain two digits. The format is:</p>
|
|
|
|
<pre>
|
|
[cc[yy[mm[dd[hh]]]]]mm[.ss]
|
|
</pre>
|
|
|
|
<p>where cc is the century, yy is the last two digits of the year, the first mm is the
|
|
month (from 01 to 12), dd is the day of the month (from 01 to 31),
|
|
hh is the hour of the day (from 00 to 23), the second mm is the
|
|
minute (from 00 to 59), and ss is the seconds (from 00 to 59). The
|
|
minute field mm is required, while the other fields are optional
|
|
and must be added in the following order: hh, dd, mm, yy, cc.</p>
|
|
|
|
<p>The ss field may be added independently of the other fields.
|
|
Time ranges are relative to the current time, so -T 1234/cm would
|
|
select all files with a modification or inode change time of 12:34
|
|
p.m. today or later. Multiple -T time range can be supplied and
|
|
checking stops with the first match.</p>
|
|
</dd>
|
|
|
|
<dt><strong>-U</strong></dt>
|
|
|
|
<dd>Select a file based on its user name, or when starting with a
|
|
#, a numeric uid. A '' can be used to escape the #. Multiple
|
|
<strong>-U</strong> options may be supplied and checking stops with
|
|
the first match.</dd>
|
|
|
|
<dt><strong>-X</strong></dt>
|
|
|
|
<dd>When traversing the file hierarchy specified by a path name, do
|
|
not descend into directories that have a different device ID.</dd>
|
|
|
|
<dt><strong>-Y</strong></dt>
|
|
|
|
<dd>This option is the same as the <strong>-D</strong> option,
|
|
except that the inode change time is checked using the path name
|
|
created after all the file name modifications have completed.</dd>
|
|
|
|
<dt><strong>-Z</strong></dt>
|
|
|
|
<dd>This option is the same as the <strong>-u</strong> option,
|
|
except that the modification time is checked using the path name
|
|
created after all the file name modifications have completed.</dd>
|
|
</dl>
|
|
|
|
<p>The options that operate on the names of files or archive
|
|
members (<strong>-c, -i, -n, -s, -u, -v, -D, -G, -T, -U, -Y, and
|
|
-Z</strong>) interact as follows.</p>
|
|
|
|
<ul>
|
|
<li>When extracting files during a read operation, archive members
|
|
are selected based only on the user specified <em>pattern</em>
|
|
operands as modified by the <strong>-c, -n, -u, -D, -G, -T,
|
|
-U</strong> options. Then any <strong>-s</strong> and <strong>
|
|
-i</strong> options will modify in that order, the names of these
|
|
selected files. Then the <strong>-Y</strong> and <strong>
|
|
-Z</strong> options will be applied based on the final path name.
|
|
Finally the <strong>-v</strong> option will write the names
|
|
resulting from these modifications.</li>
|
|
|
|
<li>When archiving files during a write operation, or copying files
|
|
during a copy operation, archive members are selected based only on
|
|
the user specified path names as modified by the <strong>-n, -u, -D,
|
|
-G, -T, and -U</strong> options (the <strong>-D</strong> option
|
|
only applies during a copy operation). Then any <strong>-s</strong>
|
|
and <strong>-i</strong> options will modify in that order, the
|
|
names of these selected files. Then during a copy operation the
|
|
<strong>-Y</strong> and the <strong>-Z</strong> options will be
|
|
applied based on the final path name. Finally the <strong>
|
|
-v</strong> option will write the names resulting from these
|
|
modifications.</li>
|
|
|
|
<li>When one or both of the <strong>-u</strong> or <strong>
|
|
-D</strong> options are specified along with the <strong>
|
|
-n</strong> option, a file is not considered selected unless it is
|
|
newer than the file to which it is compared.</li>
|
|
</ul>
|
|
|
|
<p><strong>Operands</strong></p>
|
|
|
|
<p>The <em>directory</em> operand specifies a destination directory
|
|
path name. If the <em>directory</em> operand does not exist, or it
|
|
is not writable by the user, or it is not of type directory,
|
|
<strong>pax</strong> will exit with a non-zero exit status.</p>
|
|
|
|
<p>The <em>pattern</em> operand is used to select one or more
|
|
path names of archive members. When the <em>pattern</em> operand is
|
|
not supplied, all members of the archive will be selected. When a
|
|
pattern matches a directory, the entire file hierarchy rooted at
|
|
that directory will be selected. When a <em>pattern</em> operand
|
|
does not select at least one archive member, <strong>pax</strong>
|
|
will write these <em>pattern</em> operands in a diagnostic message
|
|
to standard error and then exit with a non-zero exit status.</p>
|
|
|
|
<p>The <em>file</em> operand specifies the path name of a file to be
|
|
copied or archived. When a <em>file</em> operand does not select at
|
|
least one archive member, <strong>pax</strong> will write these
|
|
<em>file</em> operand path names in a diagnostic message to standard
|
|
error and then exit with a non-zero exit status.</p>
|
|
|
|
|
|
<p><strong>Environment Variables</strong></p>
|
|
|
|
<p><strong>pax</strong> is affected by the following environment
|
|
variables:</p>
|
|
|
|
<dl>
|
|
<dt><strong>LANG</strong></dt>
|
|
|
|
<dd>Provides a default value for locale categories that are not specifically
|
|
set with a variable starting with LC_.</dd>
|
|
|
|
<dt><strong>LC_TIME</strong></dt>
|
|
|
|
<dd>Defines the date and time format used in displaying file times.
|
|
</dd>
|
|
|
|
<dt><strong>QIBM_CCSID</strong></dt>
|
|
|
|
<dd><strong>pax</strong> creates the file extracted from the archive in the CCSID specified by
|
|
the value of the environment variable.</dd>
|
|
</dl>
|
|
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 All files were processed successfully</li>
|
|
|
|
<li>1 An error occurred</li>
|
|
</ul>
|
|
|
|
<p><strong>Related information</strong></p>
|
|
|
|
<ul>
|
|
<li><a href="compress.htm">compress - Compress data</a></li>
|
|
|
|
<li><a href="tar.htm">tar - File archiver</a></li>
|
|
</ul>
|
|
|
|
<p><strong>Examples</strong></p>
|
|
|
|
<ol>
|
|
<li>Copy the contents of the current directory to an archive file:
|
|
|
|
<pre>
|
|
pax -w -f saved.ar
|
|
</pre>
|
|
</li>
|
|
|
|
<li>Display the verbose table of contents for an archive file:
|
|
|
|
<pre>
|
|
pax -r -v -f saved.ar
|
|
</pre>
|
|
</li>
|
|
|
|
<li>The following commands copy the entire directory tree anchored at /home/abbey/olddir
|
|
to /home/abbey/newdir:
|
|
|
|
<pre>
|
|
mkdir /home/abbey/newdir
|
|
cd /home/abbey/olddir
|
|
pax -rw . /home/abbey/newdir
|
|
</pre>
|
|
</li>
|
|
|
|
<li>Interactively select the files to copy from the current
|
|
directory to the directory destination:
|
|
|
|
<pre>
|
|
pax -rw -i . destination
|
|
</pre>
|
|
</li>
|
|
|
|
<li>Extract all files from an archive file that are owned by
|
|
user root and group bin and preserve all file permissions:
|
|
|
|
<pre>
|
|
pax -r -pe -U root -G bin -f saved.ar
|
|
</pre>
|
|
</li>
|
|
|
|
<li>List and update only those files in the destination directory
|
|
/backup which are older than files with the same name found in the
|
|
source directory /sourcecode:
|
|
|
|
<pre>
|
|
pax -r -w -v -Y -Z /sourcecode /backup
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
|
|
<!-- end ibmbody========================================================= -->
|
|
</body>
|
|
</html>
|
|
|