tar(1) C2 Trusted DG/UX 5.4.2T tar(1)
NAME
tar - tape file archiver
SYNOPSIS
tar -c[vwfbLkFhienA[#s]] device block tapesize incfile [file . . .]
tar -c[vwfbLkXhienA[#s]] device block tapesize excfile [[-I incfile | file] . . .]
tar -r[vwfbLkFhienA[#s]] device block tapesize incfile [file . . .]
tar -r[vwfbLkXhienA[#s]] device block tapesize excfile [[-I incfile | file] . . .]
tar -t[vfLFien[#s] device incfile [file . . .]
tar -t[vfLXien[#s] device excfile [[-I incfile | file] . . .]
tar -u[vwfbLkFhienA[#s]] device block tapesize incfile [file . . .]
tar -u[vwfbLkXhienA[#s]] device block tapesize excfile [[-I incfile | file] . . .]
tar -x[lmovwfLFpienA[#s]] device incfile [file . . .]
tar -x[lmovwfLXpienA[#s]] device excfile [[-I incfile | file] . . .]
DESCRIPTION
NOTE: tar on Trusted DG/UX does not save security attributes. Thus,
the security attributes of files restored with tar will be set
based upon the security attributes of the restoring process.
It is recommended that dump2(1M) or cpio(1) be used to make a
trusted archive.
tar saves and restores files on magnetic tape. Its actions are
controlled by a string of characters containing one function letter
(c, r, t, u, or x), and possibly followed by one or more function
modifiers (v, w, f, b, L, k, F, X, h, i, e, n, A, l, m, o, p, and
#s). Other arguments to the command are files (or directory names)
specifying which files are to be dumped or restored. A file name
which follows a -I is interpreted as an include file whose contents
is a list files or directories to be included in the file list. In
all cases, appearance of a directory name refers to the files and
(recursively) subdirectories of that directory.
The function letters are as followings:
-c Create a new tape; writing begins at the beginning of the
tape, instead of after the last file. This function letter
implies the r function letter.
-r Replace. The named files are written on the end of the tape.
The c and u function letters imply this function letter.
-t Table. The names and other information for the specified
files are listed each time they occur on the tape. The
listing is similar to the format produced by the ls -l
command [see ls(1)]. If no files argument is given, all the
names on the tape are listed.
-u Update. The named files are added to the tape if they are
not already there, or have been modified since last written
on that tape. This function letter implies the r function
letter.
-x Extract. The named files are extracted from the tape. If a
named file matches a directory whose contents had been
written onto the tape, this directory is (recursively)
extracted. Use the file or directory's relative path when
appropriate, or tar will not find a match. If tar is invoked
Licensed material--property of copyright holder(s) 1
tar(1) C2 Trusted DG/UX 5.4.2T tar(1)
as superuser, the ownership and permissions for the file are
restored. If no files argument is given, the entire content
of the tape is extracted. Note that if several files with
the same name are on the tape, the last one overwrites all
earlier ones.
The characters below may be used in addition to the letter that
selects the desired function. Use them in the order shown in the
synopsis.
[0-9] Digit modifiers determine the drive on which the tape is
mounted. The digit modifier tells tar to use a drive other
than the default drive. Drive numbers are mapped to actual
devices by entries in the file /etc/default/tar. In
addition, entries in /etc/default/tar specify a default
record size and default media capacity for each drive number.
The format for each entry is
archiven=device-file blocking-factor capacity
where n is the drive number, device-file is the full pathname
for the device (e.g. /dev/rmt/0), blocking-factor is the
default record size in blocks, and capacity is the media
capacity in kilobytes. If neither a digit function modifier
nor the f function modifier is specified, drive 0 is assumed
by default.
v Verbose. Normally, tar does its work silently. The v
(verbose) function modifier causes tar to echo to the
screen, the name of each file it treats, preceded by
the function letter. With the t function letter, v
gives more information about the tape entries than
just the name.
w What. This causes tar to print the action to be
taken, followed by the name of the file, and then wait
for your confirmation. If a word beginning with y is
given, the action is performed. Any other input means
no. This is not valid with the t function letter.
f File. This causes tar to use the device argument as
the name of the archive instead of /dev/rmt/0. If the
name of the file is -, tar writes to the standard
output or reads from the standard input, whichever is
appropriate. Thus, tar can be used as the head or
tail of a pipeline. tar can also be used to move
hierarchies with the command:
cd fromdir; tar cf - . | (cd todir; tar xf -)
b Blocking Factor. This causes tar to use the block
argument as the blocking factor for tape records
rather than the default. The default blocking factor
is determined as follows: If a drive number is
specified via function modifiers 0 through 9, the
Licensed material--property of copyright holder(s) 2
tar(1) C2 Trusted DG/UX 5.4.2T tar(1)
default is taken from the /etc/default/tar entry for
that drive number. If an output device is specified
via the f function modifier, the default is 32. If
neither a drive number nor the f function modifier is
specified, drive number 0 is assumed and the blocking
factor is obtained from the entry for drive 0 in the
/etc/default/tar file. The maximum blocking factor is
32. This function letter should not be supplied when
operating on regular archives or block special
devices. The block size is determined automatically
when reading tapes created on block special devices
(function letters x and t).
l Link. This tells tar to complain if it cannot resolve
all of the links to the files being dumped. If l is
not specified, no error messages are printed.
m Modify. This tells tar to not restore the
modification times. The modification time of the file
will be the time of extraction.
o Ownership. This causes extracted files to take on the
user and group identifier of the user running the
program, rather than those on tape. This is only
valid with the x function letter.
L Follow symbolic links. This causes symbolic links to
be followed. By default, symbolic links are not
followed. This function is identical to that of the h
function modifier.
k This function modifier uses the tapesize argument as
the size in bytes per volume for non-tape devices
(such as a floppy drive). If this argument is not
given, or if tapesize is 0, multi-volume mode is
disabled (the volume is assumed to be of infinite
length). This option allows you to create tar
archives which span more than one tape. For example,
to create a tar image on 150 Mbyte tapes, use a
command line similar to
tar -cvfk /dev/rmt/0 145000 dir
This function modifier may be used with the c, r, and
u function letters.
F This function modifier uses the incfile
argument as a file containing a list of named
files (or directories) to be included on the
tape. This modifier can often be very helpful
for including a list of files generated by the
find(1) command. For example, if you wanted to
archive the files under the directory mydir to
/dev/rmt/0 but wanted to exclude its
subdirectories, you could do so with the
following commands:
find mydir \! -type d -print >/tmp/list
Licensed material--property of copyright holder(s) 3
tar(1) C2 Trusted DG/UX 5.4.2T tar(1)
tar cF /tmp/list
This function modifier may not be used with the
X function modifier; however, the -I option,
which performs the same function, is permitted
with the X modifier.
X This function modifier uses the excfile
argument as a file containing a list of
named files (or directories) to be
excluded, and may be used with all
function letters. This function
modifier may not be used with the F
function modifier.
h This function modifier causes tar to
follow symbolic links as if they were
normal files or directories. Normally
tar does not follow symbolic links.
The h function modifier may be used
with the function letters c, r, and u.
p This function modifier restores the
named file arguments to their original
modes, ignoring the present value
returned by umask [see umask(2) in the
Programmer's Reference Manual]. This
option is not necessary if the the
effective user ID is root. For users
with root privileges, the umask is
always ignored and file modes are
restored exactly as they were recorded
in the archive. This function modifier
may only be used with the x function
letter.
i This function modifier causes tar to
ignore directory checksum errors.
e This function modifier causes tar to
quit when certain minor errors are
encountered. examples of "minor
errors" are: a file name that is too
long, and a file that changes size
while it is being backed up. Without
this modifier, tar will continue when
errors such as these are encountered.
n This function modifier must be used
when the device argument is for a non-
tape device (for example, a floppy
drive).
A This function modifier causes absolute
pathnames for files to be suppressed,
and may be used with the r, c, u, and x
function letters. This causes all
pathnames to be interpreted as relative
to the current working directory.
Licensed material--property of copyright holder(s) 4
tar(1) C2 Trusted DG/UX 5.4.2T tar(1)
The -I option is similar in function to the F
function modifier. The argument following -I
is assumed to be an include file containing a
list of named files (or directories) to be
included in the archive. Unlike the F function
modifier, -I may be used with the X function
modifier; it may also be specified more than
once on the command line. The -I option and
the F function modifier may not specified
together.
FILES
/etc/default/tar
/dev/rmt/*
/tmp/tar*
DIAGNOSTICS
Complains about bad key characters and tape read/write errors.
Complains if not enough memory is available to hold the link tables.
SEE ALSO
ar(1), cpio(1), ls(1), umask(2), tar(5).
NOTES
Tar maintains the block allocation limit of control point
directories.
The r and u options are not supported when writing to tape drives;
they can be used only when writing tar images to disk.
Tar does not maintain the file node allocation limit of control point
directories due to limitations in the tar(4) header format.
The limit on path name length is 255 characters (155 characters for
the directory portion and 100 characters for the file name portion).
The block and seek sizes reported when verbose mode (function
modifier v) is specified are rounded to the nearest kilobyte.
Licensed material--property of copyright holder(s) 5