Devices and archive formats may impose restrictions on blocking. File or archive member names that substitute to the empty string are ignored when reading and writing archives.īlock the output at a positive decimal integer number of bytes per write to the archive file. The optional trailing p causes successful substitutions to be written to standard error. The optional trailing g is as defined in the ed command. Multiple -s expressions can be specified the expressions are applied in the order specified, terminating with the first successful substitution. The old string also is permitted to contain newline characters.Īny non-null character can be used as a delimiter ( " /" is shown here). Where, as in ed, old is a basic regular expression and new can contain an ampersand (" &") or a " \n" backreference, where n is a digit. The concepts of "address" and "line" are meaningless in the context of the pax command, and must not be supplied.
Modify file or archive member names named by pattern or file operands according to the substitution expression replstr, which is based on the ed s (substitution) command, using the regular expression syntax on the regex manual page. Specify the path name of the input or output archive, overriding the default standard input (in list or read modes) or standard output (write mode). This option will not work for some archive devices, such as 1/4-inch streaming tapes and 8mm tapes. Write files to the standard output in the specified archive format.Īppend files to the end of the archive. When traversing the file hierarchy specified by a path name, pax will not descend into directories with a different device ID (st_dev). 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.Ĭause the access times of the archived files to be the same as they were before being read by pax. Ignore files that are older (having a less recent file modification time) than a pre-existing file or archive member with the same name.Īn archive member with the same name as a file in the file system is extracted if the archive member is newer than the file.Īn archive file member with the same name as a file in the file system is superseded if the file is newer than the archive member. In copy mode, hard links are made between the source and destination file hierarchies whenever possible. Prevent the overwriting of existing files. The pax command immediately exits with a non-zero exit status if end-of-file is encountered when reading a response or if /dev/tty cannot be opened for reading and writing. Otherwise, its name is replaced with the contents of the line. If this line consists of a single period, the file or archive member is processed with no modification to its name. If this line is blank, the file or archive member is skipped. The prompt contains the name of the file or archive member. For each archive member matching a pattern operand or file matching a file operand, a prompt is written to the file /dev/tty. Interactively rename files or archive members. Read an archive file from standard input. Otherwise, write archive member path names to standard error (see standard error). In list mode, produce a verbose table of contents (see standard output). No more than one archive member is matched for each pattern (although members of type directory still match the file hierarchy rooted at that file). Select the first archive member that matches each pattern operand. Match all file or archive members except those specified by the pattern or file operands.Ĭause files of type directory being copied or archived or archive members of type directory being extracted to match only the file or archive member itself and not the file hierarchy rooted at the file. It can read the contents of each, and write them to a new, single archive.
"Pax" is short for "portable archive interchange." The software support many major archive formats.