opax (1) Linux Manual Page
NAME
opax – read and write file archives and copy directory hierarchies (OpenBSD pax implementation)
SYNOPSIS
[-0cdOnvz ] -words [-f archive ] -words [-s replstr ] … -words [-U user ] … -words [-G group ] … -words [-T [from_date ] [,to_date ] ] … [pattern … ]
–r [-cdiknuvzDOYZ ] -words [-f archive ] -words [-o options ] … -words [-p string ] … -words [-s replstr ] … [-E limit ] -words [-U user ] … -words [-G group ] … -words [-T [from_date ] [,to_date ] ] … [pattern … ]
–w [-0dituvzHLOPX ] -words [-b blocksize ] [[-a ] [-f archive ] ] -words [-x format ] -words [-s replstr ] … -words [-o options ] … -words [-U user ] … -words [-G group ] … -words [-B bytes ] -words [-T [from_date ] [,to_date ] [/[c][m] ] ] … [file … ]
–r –w [-0diklntuvDHLOPXYZ ] -words [-p string ] … -words [-s replstr ] … -words [-U user ] … -words [-G group ] … -words [-T [from_date ] [,to_date ] [/[c][m] ] ] … [file … ] directory
DESCRIPTION
will read, write, and list the members of an archive file, and will copy directory hierarchies. 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 –x option.
The presence of the –r and the –w options specifies which of the following functional modes will operate under: list , read , write and copy
<none>- List will write to standard output a table of contents of the members of the archive file read from standard input, whose pathnames match the specified patterns The table of contents contains one filename per line and is written using single line buffering.
-r- Read extracts the members of the archive file read from the standard input, with pathnames matching the specified patterns 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 –
poption. -w- Write writes an archive containing the file operands to standard output using the specified archive format. When no file operands are specified, a list of files to copy with one per line is read from standard input. When a file operand is also a directory, the entire file hierarchy rooted at that directory will be included.
-r -w- Copy copies the file operands to the destination directory When no file operands are specified, a list of files to copy with one per line is read from the standard input. When a file 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 –
loption below).Warning The destination directory must not be one of the file 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.
While processing a damaged archive during a read or list operation, 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 –E option for more details on error handling).
The directory operand specifies a destination directory pathname. If the directory operand does not exist, or it is not writable by the user, or it is not of type directory, will exit with a non-zero exit status.
The pattern operand is used to select one or more pathnames of archive members. Archive members are selected using the pattern matching notation described by fnmatch(3). When the pattern 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 pattern operand does not select at least one archive member, will write these pattern operands in a diagnostic message to standard error and then exit with a non-zero exit status.
The file operand specifies the pathname of a file to be copied or archived. When a file operand does not select at least one archive member, will write these file operand pathnames in a diagnostic message to standard error and then exit with a non-zero exit status.
The options are as follows:
-r- Read an archive file from standard input and extract the specified files If any intermediate directories are needed in order to extract an archive member, these directories will be created as if mkdir(2) was called with the bitwise inclusive
ORofS_IRWXU , S_IRWXGandS_IRWXOas the mode argument. When the selected archive format supports the specification of linked files and these files cannot be linked while the archive is being extracted, will write a diagnostic message to standard error and exit with a non-zero exit status at the completion of operation. -w- Write files to the standard output in the specified archive format. When no file operands are specified, standard input is read for a list of pathnames with one per line without any leading or trailing Aq blanks .
-a- Append files to the end of an archive that was previously written. If an archive format is not specified with a –
xoption, 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 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.Warning Many storage devices are not able to support the operations necessary to perform an append operation. Any attempt to append to an archive stored on such a device may damage the archive or have other unpredictable results. Tape drives in particular are more likely to not support an append operation. An archive stored in a regular file system file or on a disk device will usually support an append operation.
-0- Use the NUL (`
