Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tar(1) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

cpio(1)

ls(1)

umask(2)

tar(5)



tar(1)                         DG/UX R4.11MU05                        tar(1)


NAME
       tar - file archiver

SYNOPSIS
       tar c[vwfbknFhLleA[#]] device block volsize incfile [file . . .]
       tar c[vwfbknXhLleA[#]] device block volsize excfile [[-I incfile | file] . . . ]
       tar r[vwfbknFhLlieA[#]] device block volsize incfile [file . . .]
       tar r[vwfbknXhLlieA[#]] device block volsize excfile [[-I incfile | file] . . . ]
       tar t[vfbnFieA[#]] device block incfile [file . . .]
       tar t[vfbnXieA[#]] device block excfile [[-I incfile | file] . . . ]
       tar u[vwfbknFhLlieA[#]] device block volsize incfile [file . . .]
       tar u[vwfbknXhLlieA[#]] device block volsize excfile [[-I incfile | file] . . . ]
       tar x[vwfbnFieAmop[#]] device block incfile [file . . .]
       tar x[vwfbnXieAmop[#]] device block excfile [[-I incfile | file] . . . ]

DESCRIPTION
       NOTE:  tar on a system with DG/UX information security 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.

       NOTE:  Tape devices are controlled devices, and the non-privileged
              user may not have complete access to them.  As installed,
              systems with DG/UX information security allow all users write
              access to tape devices, and only privileged users are allowed
              read access.  This is because all tape devices are assigned a
              MAC range of from IMPLEMENTATION_LO to IMPLEMENTATION_HI.  The
              system administrator may allow different access by reseting
              these values.

       tar saves files on an archive medium (such as a floppy diskette or a
       tape) and restores them from that medium.  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, k, n, F, X, h, L, l, i, e, A, m, o, p, and #).  Other arguments
       to the command are files (or directory names) specifying which files
       are to be dumped or restored.  In all cases, appearance of a
       directory name refers to the files and (recursively) subdirectories
       of that directory.

       The function letters are as follows:

       c       Create a new archive; writing begins at the beginning of the
               archive, instead of after the last file.

       r       Replace.  The named files are written on the end of an
               existing archive.

       t       Table.  The names of the specified files are listed each time
               they occur on the archive.  If no files are specified, all
               the names in the archive are listed.  With the v modifier,
               the listing is similar to the format produced by the ls -l
               command.  [See ls(1).]

       u       Update.  The named files are added to the archive if they are
               not already there, or have been modified since last written
               on that archive.

       x       Extract.  The named files are extracted from the archive.  If
               a named file matches a directory whose contents have been
               written onto the archive, this directory is (recursively)
               extracted.  Use the file or directory's relative path when
               appropriate, or tar will not find a match.  If no files are
               specified, the entire contents of the archive are extracted.
               If several files with the same name are on the archive, the
               last one overwrites all earlier ones.

       The modifiers below may be used in addition to the letter that
       selects the desired function.  Use them in the order shown in the
       synopsis.

       v       Normally, tar does its work silently.  The v (verbose)
               modifier causes it to print the name of each file it treats,
               preceded by the function letter.  With the t function letter,
               v gives more information about the archive entries than just
               the name.

       w       What.  This modifier 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.

       f       File.  This causes tar to use the device argument as the name
               of the archive.  If f is given, /etc/default/tar is not
               searched.  If f is omitted, tar will use the device indicated
               by the TAPE environment variable, if set; otherwise, it will
               use the default values defined in /etc/default/tar.  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       This modifier causes tar to use the block argument as the
               blocking factor for archive records.  If the device is
               selected via an /etc/default/tar entry, the default blocking
               factor comes from that entry.  If a device other than - is
               selected via the f modifier, the default is 32.  The maximum
               blocking factor is 128.  This modifier should not be supplied
               when operating on regular archives or block special devices.
               The blocking factor is determined automatically when reading
               tapes (function letters x and t) unless it is larger than 32.
               To read tapes that contain larger records, provide the b
               modifier with a larger value.

       k       This modifier uses the volsize argument as the size, in
               kilobytes per volume, for non-tape devices (such as floppy
               drives).  The argument to k should be a multiple of the
               blocking factor; if it isn't, tar will round it down to the
               nearest such multiple.  A value of 0 for volsize causes
               multi-volume mode to be disabled (interpreted as an infinite
               volume size).

               When restoring from a multi-volume archive, tar prompts for a
               new volume only if a split file has been partially restored.
               Otherwise tar exits at the end of the volume.  If this
               happens, run the tar command again for the next volume.

       n       This modifier must be used when device is not a tape device.

       F       This modifier uses the incfile argument as a file containing
               a list of named files (or directories) to be included.  This
               modifier may not be used with the X modifier.

       X       This modifier uses the excfile argument as a file containing
               a list of named files (or directories) to be excluded.
               Multiple excfile arguments may be used, with one X modifier
               per excfile.  This modifier may not be used with the F
               modifier.

       h       This modifier causes tar to follow symbolic links as if they
               were normal files or directories.  Normally tar does not
               follow symbolic links.

       L       This function is identical to that of the h modifier.

       l       This modifier causes tar to complain if it cannot resolve all
               of the links to the files being dumped.  If the l modifier is
               not specified, no error messages are printed.

       i       This modifier causes tar to ignore directory checksum errors.

       e       This modifier causes tar to quit when certain minor errors
               are encountered.  Examples of "minor errors" are: a filename
               that is too long, and a file that changes size while it is
               being backed up.  Otherwise tar will continue when minor
               errors are encountered.

       A       This modifier causes absolute pathnames for files to be
               suppressed.  This causes all pathnames to be interpreted as
               relative to the current working directory.

       m       This modifier causes tar to not restore the modification
               times.  The modification time of the file will be the time of
               extraction.

       o       When tar is run by a user without appropriate privilege,
               extracted files take on the user and group identifiers of the
               user running the program.  This modifier gives a user with
               appropriate privilege that same behavior.  Normally, when tar
               is run by a user with appropriate privilege, extracted files
               take on the user and group identifiers that are stored in the
               archive.

       p       This modifier restores the named file arguments to their
               original modes, ignoring the present value returned by umask.
               [See umask(2).]  This modifier is not necessary if the
               effective user ID is root, in which case the umask is always
               ignored and file modes are restored exactly as they were
               recorded in the archive.

       [#]     This modifier allows you to specify, via the file
               /etc/default/tar, the device to be used for creating or
               extracting an archive.  Specify a number 0 through 9 as the
               value of #.  tar looks for the ``archive#='' entry in
               /etc/default/tar and uses the device name specified there.

               In addition to the device name, an entry in /etc/default/tar
               specifies the blocking factor and the volume size to be used
               for that device.  (The b and k modifiers may be used to
               override these values.)  For example, the default device
               entry in /etc/default/tar might look like:

                      archive0=/dev/rmt/0n      32      150000

               where 32 is the blocking factor and 150000 is the volume size
               (in kilobytes).

       The following option may appear after all arguments corresponding to
       function modifiers:

       -I      The -I option is similar in function to the F modifier.  The
               argument following -I is assumed to be a file containing a
               list of named files (or directories) to be included.  Unlike
               the F modifier, -I may be used with the X modifier; it may
               also be specified more than once on the command line.  The -I
               option and the F modifier may not be specified together.

FILES
       /etc/default/tar
       /dev/rmt/*
       /tmp/tar*

DIAGNOSTICS
       Complains about bad key characters and tape read/write errors.
       Complains if insufficient memory is available to hold the link
       tables.

SEE ALSO
       ar(1), cpio(1), ls(1), umask(2), appropriateprivilege(5), tar(5)

NOTES
       tar maintains the block allocation limit of control point
       directories.

       tar does not maintain the file node allocation limit of control point
       directories due to limitations in the tar(5) header format.

       The r and u function letters are not supported when writing to tape
       drives; they can be used only when writing tar images to disk.

       The limit on pathname length is 255 characters (155 characters for
       the directory portion and 100 characters for the filename portion).

       The block and seek sizes reported when verbose mode (modifier v) is
       specified are rounded to the nearest kilobyte.

       On a generic DG/UX system, appropriate privilege is granted by having
       an effective UID of 0 (root).  See the appropriateprivilege(5) man
       page for more information.

       On a system with DG/UX information security, appropriate privilege is
       granted by having one or more specific capabilities enabled in the
       effective capability set of the user.  See the capdefaults(5) man
       page for more information.


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026