-a
Append files to the archive. This may not work on some tape devices.
-b
size
Use size
as the blocksize, in bytes, of blocks to be written to the archive.
-c
Complement. Match all file or archive members that do not
match the patterns.
-d
For files or archive members that are directories, extract or archive only the directory itself, not the tree it contains.
-f
archive
Use archive
instead of standard input or standard output.
-i
Interactively rename files. For each file, pax
writes a prompt to /dev/tty
and reads a one-line response from /dev/tty
. The responses are as follows:
-k
Do not overwrite existing files.
-l
Make hard links. When copying a directory tree (-rw
), make hard links between the source and destination hierarchies wherever possible.
-n
Choose the first archive member that matches each pattern. No more than one archive member will match for each pattern.
-o
options
Reserved for format-specific options. (Apparently unused in Solaris.)
-p
privs
Specify one or more privileges for the extracted file. privs
specify permissions or other characteristics to be preserved or ignored.
-r
Read an archive and extract files.
-s
replacement
Use replacement
to modify file or archive member names. This is a string of the form -s/
old
/
new
/
[gp
]. This is similar to the substitution commands in ed
, ex
, and sed
. old
is a regular expression, and new
may contain &
to mean the matched text and \
n
for subpatterns. The trailing g
indicates the substitution should be applied globally. A trailing p
causes pax
to print the resulting new filename. Multiple -s
options may be supplied. The first one that works is applied. Any delimiter may be used, not just /
, but in all cases it is wise to quote the argument to prevent the shell from expanding wildcard characters.
-t
Reset the access time of archived files to what they were before being archived by pax
.
-u
Ignore files older than preexisting files or archive members. The behavior varies based on the current mode.
- Extract mode
Extract the archive file if it is newer than an existing file with the same name.
- Archive mode
If an existing file with the same name as an archive member is newer than the archive member, supersede the archive member.
- Pass-through mode
Replace the file in the destination hierarchy with the file in the source hierarchy (or a link to it) if the source hierarchy's file is newer.
-v
In list mode, print a verbose table of contents. Otherwise, print archive member names on standard error.
-w
Write files to standard output in the given archive format.
-x
format
Use the given format
for the archive. The value of format
is either cpio
or ustar
. The details of both formats are provided in the IEEE 1003.1 (1990) POSIX standard. The two formats are mutually incompatible; attempting to append using one format to an archive using the other is an error.
-X
When traversing directory trees, do not cross into a directory on a different device (the st_dev
field in the stat
structure, see stat
(2); similar to the -mount
option of find
).