Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tar(1) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

cpio(1)

ls(1)

umask(2)

tar(5)

tar(1)



tar(1)                         DG/UX 5.4R3.00                         tar(1)


NAME
       tar - tape file archiver

SYNOPSIS
       tar -c[vwfbLkFhienA[#]] device block tapesize incfile [file . . .]
       tar -c[vwfbLkXhienA[#]] device block tapesize excfile [[-I incfile | file] . . .]
       tar -r[vwfbLkFhienA[#]] device block tapesize incfile [file . . .]
       tar -r[vwfbLkXhienA[#]] device block tapesize excfile [[-I incfile | file] . . .]
       tar -t[vfLFien[#] device incfile [file . . .]
       tar -t[vfLXien[#] device excfile [[-I incfile | file] . . .]
       tar -u[vwfbLkFhienA[#]] device block tapesize incfile [file . . .]
       tar -u[vwfbLkXhienA[#]] device block tapesize excfile [[-I incfile | file] . . .]
       tar -x[lmovwfLFpienA[#]] device incfile [file . . .]
       tar -x[lmovwfLXpienA[#]] device excfile [[-I incfile | file] . . .]

DESCRIPTION
       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 #).
       Other arguments to the command are files (or directory names)
       specifying which files are to be dumped or restored.  A filename
       which follows a -I is interpreted as an include file whose contents
       is a list of 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 follows:

       -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
               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.




Licensed material--property of copyright holder(s)                         1




tar(1)                         DG/UX 5.4R3.00                         tar(1)


       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.

       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 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 128.
               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 (function letters
               x and t) unless it is larger than 32.  To read tapes that
               contain larger records, provide the b function modifier with
               a larger value.
       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



Licensed material--property of copyright holder(s)                         2




tar(1)                         DG/UX 5.4R3.00                         tar(1)


               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

                     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)].  This option is not necessary if 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 is only useful 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
               filename 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.



Licensed material--property of copyright holder(s)                         3




tar(1)                         DG/UX 5.4R3.00                         tar(1)


       n       This function modifier must be used when the archive is 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.


       [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.

       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 be 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).











Licensed material--property of copyright holder(s)                         4




tar(1)                         DG/UX 5.4R3.00                         tar(1)


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 options 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 (function
       modifier v) is specified are rounded to the nearest kilobyte.

CAVEATS
       When creating multiple tape archives, tar will occasionally divide
       the archive into completely separate tar images.  In this case, it
       will be necessary to execute tar more than once in order to restore
       the entire archive.  When this happens, tar will complete execution
       before all the tapes archived have been restored.  There will be no
       loss of data.


































Licensed material--property of copyright holder(s)                         5


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