Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ar(1) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lorder(1)

ld(1)

ranlib(1)

ar(5)

ranhash(3x)

dump(1)



     AR(1)                                                       AR(1)



     NAME
          ar - archive and library maintainer

     SYNOPSIS
          ar option [ posname ] file1 ... fileN

     DESCRIPTION
          The archiver (ar) maintains groups of files as a single
          archive file.  Generally, you use this utility to create and
          update library files that the link editor uses; however, you
          can use the archiver for any similar purpose.  NOTE: This
          version uses a portable ASCII-format archive that you can
          use on various machines that run UNIX.

          In the text, option refers to a character (from the set
          drqtpmx) that you can concatenate with one or more of
          svuaibclo. A suboption refers to options (from the set
          abiou) that you can only use with other options.

          The options do these things:

          d    Deletes the specified files from the archive file.

          r    Replaces the specified files in the archive file.  If
               you use the suboption u with r, the archiver only
               replaces those files that have `last-modified' dates
               later than the archive files.  If you use a positioning
               character (from the set abi) you must specify the
               posname argument to tell the archiver to put the new
               files after (a) or before (b or i).  Otherwise, the
               archiver puts new files at the end of the archive.

          q    Appends the specified files to the end of the archive
               file.  The archiver does not accept suboption
               positioning characters with the q option.  It also does
               not check whether the files you want to add already
               exist in the archive.  Use the q option only to avoid
               quadratic behavior when you create a large archive
               piece by piece.

          t    Prints a table of contents for the files in the archive
               file.  If you don't specify any file names, the
               archiver builds a table of contents for all files.  If
               you specify file names, the archiver builds a table of
               contents only for those files.

          p    Prints the specified files from the archive.

          m    Moves the specified files to the end of the archive.
               If you specify a positioning character, you must also
               specify the posname (as in option r) to tell the
               archiver where to move the files.



     Page 1                                        (last mod. 8/20/87)





     AR(1)                                                       AR(1)



          x    Extracts the specified files from the archive.  If you
               don't specify any file names, the archiver extracts all
               files.  When it extracts files, the archiver does not
               change any file.  Normally, the `last-modified' date
               for each extracted file shows the date when someone
               extracted it; however, when you use o, the archiver
               resets the `last-modified' date to the date recorded in
               the archive.

          s    Makes a symbol definition (symdef file) as the first
               file of an archive.  This file contains a hash table of
               ranlib structures and a corresponding string table. The
               symdef file's name is based on the byte ordering of the
               hash table and the byte ordering of the file's target
               machine.  Files must be consistent in their target byte
               ordering before the archiver can create a symdef file.
               The s option is automatically added when any of the
               options `d', `q', `m', or `r' is requested.  If you
               specify `s', the archiver creates the symdef file as
               its last action before finishing execution.  You must
               specify at least one other archive option (m, p, q, r,
               or t) when you use the s option.

          v    Gives a verbose file-by-file description as the
               archiver makes a new archive file from an old archive
               and its constituent files.  When you use this option
               with t, the archiver lists all information about the
               files in the archive.  When you use this option with p,
               the archiver precedes each file with a name.

          c    Suppresses the normal message that the archiver prints
               when it creates the specified archive file. Normally,
               the archiver creates the specified archiver file when
               it needs to.

          l    Puts temporary files in the local directory. Normally,
               the archiver puts its temporary files in the directory
               /tmp.

          The suboptions do these things:

          a    Specifies that the file goes after the existing file
               (posname).  Use this suboption with the m or r options.

          b    Specifies that the file goes before the existing file
               (posname).  Use this suboption with the m or r options.

          i    Specifies that the file goes before the existing file
               (posname).  Use this suboption with the m or r options.

          o    Forces a newly created file to have the `last modified'
               data that it had before it was extracted from the



     Page 2                                        (last mod. 8/20/87)





     AR(1)                                                       AR(1)



               archive.  Use this suboption with the x option.

          u    Prevents the archiver from replacing an existing file
               unless the replacement is newer than the existing file.
               This option uses the UNIX system `last modified' data
               for this comparison.  Use this suboption with the r
               option.  u gives no warning when replacement is
               refused.

     FILES
          /tmp/v*   temporaries

     SEE ALSO
          lorder(1), ld(1), ranlib(1), ar(5), ranhash(3x), dump(1)

     BUGS
          If you specify the same file twice in an argument list, it
          can appear twice in the archive file.

          The o option does not change the `last-modified' date of a
          file unless you own the extracted file or you are the
          super-user.

     ORIGIN
          MIPS Computer Systems






























     Page 3                                        (last mod. 8/20/87)



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