Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (t - u) tar(1)
NAME
tar - Manipulates tape-archive-format
files
SYNOPSIS
tar [ -]required_flag[Abflmovw ]|
[operand ... ]
FLAGS
The function performed by tar is specified by one of the following values for required_flag:
c Creates a new archive file. If the archive file is on tape, writing begins at the beginning
of the tape instead of after the last file. The use of this flag implies the function of the
required_flag value of r.
r Writes the files specified by operand values at the end of the tape or appends them to
the end of an existing archive file. The use of the required_flag value of c implies the
function of this flag.
t Lists the names of the files specified by operand values each time they occur in the
archive file. If no value is given for operand, all the names in the archive file are listed
to the standard output file.
u Adds the files specified by operand values to the archive file, if the files are not already
there or if they were modified since last archived.
x Extracts the files specified by operand values from the archive file. If a specified file
matches a directory whose contents were written into the archive file, this directory is
(recursively) extracted. The owner, modification time, and mode are restored (if possi-
ble).
If no value is given for operand, the entire content of the archive is extracted. If multi-
ple entries specifying the same file are in the archive, the last one overwrites all earlier
ones.
You can use the following flags with required_flag:
A Tells the tar command to suppress warning messages about optional access control list |
(ACL) entries. Because the tar utility does not archive optional ACL entries, a warn- |
ing message is printed for each file that has optional ACL entries. However, if tar is |
executed remotely from a system that does not support OSS ACLs, no warnings are |
printed.
b Tells the tar command to use the next operand as the blocking factor for tape records.
The default value is less than or equal to 20, and the maximum value is greater than or
equal to 20 (larger values can be specified at the risk of creating a tape archive that
some systems’ tape drives might not be able to restore).
Use this flag only when creating or writing raw magnetic tape archives. The block size
is determined automatically when reading tapes (required_flag values of x or t).
f Tells the tar command to use the first operand value (or the second, if the b flag has
been specified) as the name of the archive file.
When f is used with the required_flag value of t or x and the pathname specified for
operand is - (dash), the standard input file is an archive file formatted as with pax -x
ustar. When f is used with the required_flag value of r, u,orc and the pathname
specified for operand is - (dash), the standard output file is an archive file formatted as
with pax -x ustar. For example, the following command line is valid:
527188-007 Hewlett-Packard Company 9−5