Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tar(1) — sys5 — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

cpio(1)

ls(1)

mt(1)

TAR(1)                               SysV                               TAR(1)



NAME
     tar - tape file archiver

SYNOPSIS
     tar -c[vwfb[#s]] device block files ...
     tar -r[vwb[#s]] device block [files ...]
     tar -t[vf[#s] device
     tar -u[vwb[#s]] device block [files ...]
     tar -x[lmovwf[#s]] device [files ...]

DESCRIPTION
     tar saves and restores files on magnetic tape.  Its actions are
     controlled by the key argument.  The key is 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, 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 portion of the key is specified by one of the following
     letters:

     r       Replace.  The named files are written on the end of the tape.
             The c function implies this function.
     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.  The owner, modification time, and mode
             are restored (if possible).  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.
     t       Table. The names and other information for the specified files
             are listed each time that they occur on the tape.  The listing is
             similar to the format produced by the ls -l command.  If no files
             argument is given, all the names on the tape are listed.
     u       Add the named files to the tape only if they are not already
             there or are there, but have been modified since they were last
             archived. (Not supported by Apollo tape drivers.)  This key
             implies the r key.
     c       Create a new tape; writing begins at the beginning of the tape,
             instead of after the last file.  This key implies the r key.

     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.

     #s      This modifier determines the drive on which the tape is mounted
             (replace # with the drive number) and the speed of the drive
             (replace s with l, m, or h for low, medium or high).  The
             modifier tells tar to use a drive other than the default drive,
             or the drive specified with the -f option.  For example, with the
             5h modifier, tar would use /dev/mt/5h or /dev/mt0 instead of the
             default drives /dev/mt/0m or /dev/mt0, respectively. However, if
             for example, -f /dev/rmt0 5h appeared on the command line, tar
             would use /dev/rmt5h or /devmt0.  The default entry is 0m.

     v       Verbose.  Normally, tar does its work silently.  The v (verbose)
             option causes it to type the name of each file it treats,
             preceded by the function letter.  With the t function, 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 the user's
             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 key.

     f       File.  This causes tar to use the device argument as the name of
             the archive instead of /dev/mt/0m or /dev/mt0.  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 - .

     b       Blocking Factor.  This causes tar to use the block argument as
             the blocking factor for tape records.  The default is 1, the
             maximum is 20.  This function should not be supplied when
             operating on regular archives or block special devices.  It is
             mandatory however, when reading archives on raw magnetic tape
             archives (see f above).  The block size is determined
             automatically when reading tapes created on block special devices
             (key 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 key.
     A       Include Apollo-specific information.  Allows Domain/OS typed
             files.

     tar must be used with a mounted device.  For example, when using tar with
     /dev/rct8, first issue the command:

               mt -f /dev/rct8 rewind

     Then proceed with the tar command.

EXAMPLES
     tar cf /dev/rmt/0m /usr/you/
               Writes the contents of /usr/you and all of its subdirectories
               to /dev/rmt/0m (medium density magtape).

     tar xf /dev/rmt/0m/
               Restores all of the files from /dev/rmt/0m to the filesystem,
               writing them into the current working directory.  File
               ownership is preserved as archived.

     tar xfo /dev/rmt/0m/
               Restores all of the files from /dev/rmt/0m to the filesystem,
               writing them into the current working directory.  The person
               running tar is made owner of the restored files.

     tar cf /tarfile /usr/you/src/*.c/
               Bundles all files in /usr/you/src whose names end in ``.c''
               into /tarfile.

FILES
     /dev/rct12
     /dev/rct8
     /dev/rdsk/F0d0s1
     /dev/rdsk/S0d0s1
     /dev/rdsk/W0d0s1
     /dev/rmt12
     /dev/rmt8
     /tmp/tar*

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

BUGS
     tar supports multiple volumes.  However, you must mount each additional
     volume before proceeding. Since the window from which you have issued the
     tar command will be in a paused state (waiting for you to enter "go" or
     "abort"), you must mount the tape device from another window, using the
     mt command.  For example, when using tar with /dev/rct8, issue the
     command:
               mt -f /dev/rct8 rewind

     Then you can proceed to the paused window, and issue "go".

     There is no way to ask for the n-th occurrence of a file.

     Tape errors are handled ungracefully.

     The u option can be slow.

     The b option should not be used with archives that are going to be
     updated.  The current magnetic tape driver cannot backspace raw magnetic
     tape.  If the archive is on a disk file, the b option should not be used
     at all, because updating an archive stored on disk can destroy it.

     The current limit on file name length is 100 characters.

     tar doesn't copy empty directories or special files.

SEE ALSO
     ar(1), cpio(1), ls(1), mt(1).

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