Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(7)



TAR(1)                   DOMAIN/IX SYS5                    TAR(1)



NAME
     tar - tape (and general purpose) archiver

USAGE
     tar key [ blocksize ] [ name ] files

DESCRIPTION
     Tar is a general-purpose archiving utility that

          ⊕  bundles multiple files into a single archive file,

          ⊕  restores to the file system any or all of the files
             in this archive,

          ⊕  optionally changes permissions on the files.

     While tar is most often used to archive files on magnetic
     tape, it can also be used any time you need to bundle a
     number of files into one object for later reconstitution.
     The key is a string of characters containing one function
     letter and optional function modifiers.  It controls what
     tar does with the files to be bundled or unbundled
     (restored).  Note that in both cases (archiving and restor-
     ing), use of a directory name as one of the files includes
     all files in that directory and any subdirectories it con-
     tains.

FUNCTIONS
     Archiving Files

     The following key letters specify tar options associated
     with creating an archive file.  Unless otherwise specified
     (see OPTIONS below), the archive is written to the device
     file /dev/mt/0m.

     c   Create a new archive.  Writing begins at the beginning
         of the file.

     r   Append to an archive file.  Writing begins at the end
         the file.  (Not supported by Apollo tape drivers.)

     u   Add the named files to the archive 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.)

     Restoring Files






Printed 12/4/86                                             TAR-1







TAR(1)                   DOMAIN/IX SYS5                    TAR(1)



     The following key letters specify tar options associated
     with restoration of selected files from a tar archive file.
     Unless otherwise specified, the archive from which files are
     restored is the device file /dev/rmt/0m.  Restored files are
     always written to the current directory.

     t   List the names of all the files in the archive.

     x   Extract the named files from the archive.  If one of the
         files is a directory, tar extracts the directory and all
         files and subdirectories it contains.  If no files are
         specified, tar x extracts the entire contents of the
         archive.  Note that if several files with the same name
         are in the archive, the last one overwrites all earlier
         ones.

OPTIONS
     You may append one or more of the following characters to
     the function letter in the key.

     0-9d
         This option, valid only when writing archives to tape,
         specifies the tape drive on which the archive is mounted
         and, optionally, the density (I) of the tape as l (low),
         m (medium), or h high.  The default is drive 0, normally
         /dev/rmt/0m.

     b   Set blocksize.  This option is valid only when writing
         archives to tape. Use of this option when writing an
         archive on a disk file may destroy the archive.  If the
         b option is present on the tar command line, the key
         must be followed by a space and an integer blocksize in
         the range 1-20.  This blocksize specifies the block
         length for tape records.  The default is 1, the maximum
         is 20.  Any blocksize you specify must coincide with the
         block length in the magtape descriptor file for the dev-
         ice to which tar is writing the archive.  When tar is
         reading tapes (keyletters x or t), it determines the
         blocksize automatically.  If the f option is also
         present in the key, tar expects the name and blocksize
         arguments to occur in the same order as the f and b
         options.  (See examples.)

     f   If the f option is present on the tar command line, the
         key must be followed by a space and the name of the
         archive you want tar to read from or write to.  If this
         option is omitted, the default archive is /dev/rmt/0m.
         If name is given as a dash (-), tar writes to the stan-
         dard output or reads from the standard input, as
         appropriate.  If the b option is also present in the



TAR-2                                             Printed 12/4/86







TAR(1)                   DOMAIN/IX SYS5                    TAR(1)



         key, tar expects the name and blocksize arguments to
         occur in the same order as the f and b options.  (See
         examples.)

     o   Preserve ownership and permissions of restored files.

     l   Complain when a link to the file being archived cannot
         be resolved.

     m   Do not restore the modification times.  Modification
         time of all restored files is set to the time at which
         they are restored.

     v   Be verbose.  This option makes tar display the name of
         each file it archives or restores, preceded by a func-
         tion letter that indicates what it is doing (or planning
         to do) with the file.  These function letters are a for
         ``append to archive'' and x for ``extract from
         archive.'' When combined with the t function, v makes
         tar print out a ``long'' listing for each file in the
         archive, rather than just the name.

     w   This option makes tar display the action (see v above)
         it is about to take and the name of the file that will
         be affected, then wait for confirmation.  If you enter a
         word beginning with y, tar performs the specified
         action.  Any other input means ``no''.

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.  The person
                                running tar is made owner of the
                                restored files.

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

     tar cf /tarfile /usr/you/src/*.c
                                Bundles all files in /usr/you/src



Printed 12/4/86                                             TAR-3







TAR(1)                   DOMAIN/IX SYS5                    TAR(1)



                                whose names end in ``.c'' into
                                /tarfile.

NOTES
     Since the Apollo magnetic and cartridge tape drivers do not
     support the u and r functions, tar can only create new
     archives (tar c) if you're writing to tape.  The block
     length is fixed at 10240 bytes for the files /dev/rmt8 and
     /dev/rmt12, 512 bytes for the files /dev/rct8 and
     /dev/rct12, and 5120 bytes for the files in /dev/mt/* and
     /dev/rmt/*.  If you need to change the block length, use the
     /com/edmtdesc (edit magtape descriptor) command.

     If need to re-tension rewind the tape, use the command
     /com/rbak with the -reten (re-tension) or -rewind (rewind)
     option.

     Tar limits filename length to 100 characters, a limit which
     may affect recursive descent into deep hierarchies.

FILES
     /dev/rmt[8 | /0l]          low density magtape, rewind on
                                file close

     /dev/rmt[12 | /0ln]        low density magtape, no rewind on
                                file close

     /dev/rmt/0m                medium density magtape, rewind on
                                file close

     /dev/rmt/0mn               medium density magtape, no rewind
                                on file close

     /dev/rct[8 | /c0d0h]       cartridge tape, rewind on file
                                close

     /dev/rct[12 | /c0d0hn]     cartridge tape, no rewind on file
                                close

     /dev/rct/rfl0a             floppy file name

     /tmp/tar*                  temporary file

DIAGNOSTICS
     Tar issues various complaints about bad key characters and
     tape read/write errors.







TAR-4                                             Printed 12/4/86







TAR(1)                   DOMAIN/IX SYS5                    TAR(1)



RELATED INFORMATION
     intro(7), /com/rbak, /com/edmtdesc



















































Printed 12/4/86                                             TAR-5





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