Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(1)

lorder(1)

strip(1)

mcs(1)

a.out(4)

ar(4)



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


NAME
       ar - archive and library maintainer for portable archives

SYNOPSIS
       ar [ -V ] [-]key [ posname ] afile [ name ] ...

   where:
       key     One of the following letters: drqtpmx.  Arguments to key are
               made with one of more of the following set: vuaibcls.
       posname An archive member name used as a reference point in
               positioning other files in the archive.
       afile   The name of the archive file.
       name    A constituent file in the archive file.

DESCRIPTION
       The ar command maintains groups of files combined into a single
       archive file.  Its main use is to create and update library files as
       used by the link editor.  It can be used, though, for any similar
       purpose.  The magic string and the file headers used by ar consist of
       printable ASCII characters.  If an archive is composed of printable
       files, the entire archive is printable.

       When ar creates an archive, it creates headers in a format that is
       portable across all machines.  The portable archive format and
       structure are described in detail in ar(4).  The archive symbol table
       (described in ar(4)) is used by the link editor ld(1) to effect
       multiple passes over libraries of object files in an efficient
       manner.  An archive symbol table is only created and maintained by ar
       when there is at least one object file in the archive.  The archive
       symbol table is in a specially named file which is always the first
       file in the archive.  This file is never mentioned or accessible to
       the user.  Whenever ar(1) is used to create or update the contents of
       such an archive, the symbol table is rebuilt.  The s option described
       below will force the symbol table to be rebuilt.

   Options
       -V     Print ar's version number on standard error.

   Key Characters
       The meanings of the key characters are as follows:

       d      Delete the named files from the archive file.

       r      Replace the named files in the archive file.  If the optional
              character u is used with r, only those files with dates of
              modification later than the archive files are replaced.  If an
              optional positioning character from the set abi is used, the
              posname argument must be present and specifies that new files
              are to be placed after (a) or before (b or i) posname.
              Otherwise new files are placed at the end.

       q      Quickly append the named files to the end of the archive file.
              Optional positioning characters are invalid.  The command does
              not check whether the added members are already in the



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




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


              archive.  This option is useful to avoid quadratic behavior
              when creating a large archive piece-by-piece.  Unchecked, the
              file may grow exponentially up to the second degree.

       t      Print a table of contents of the archive file.  If no names
              are given, all files in the archive are tabled.  If names are
              given, only those files are tabled.

       p      Print the named files in the archive.

       m      Move the named files to the end of the archive.  If a
              positioning character is present, then the posname argument
              must be present and, as in r, specifies where the files are to
              be moved.

       x      Extract the named files.  If no names are given, all files in
              the archive are extracted.  In neither case does x alter the
              archive file.

       The meanings of the other key arguments are as follows:

       v      Give a verbose file-by-file description of the making of a new
              archive file from the old archive and the constituent files.
              When used with t, give a long listing of all information about
              the files.  When used with x, precede each file with a name.

       u      Act only on those files with dates of modification later than
              the archive file's.

       a      (See the r key letter.)

       b      (See the r key letter.)

       i      (See the r key letter.)

       c      Suppress the message that is produced by default when afile is
              created.

       l      Place temporary files in the local (current working) directory
              rather than in the default temporary directory, TMPDIR.  In an
              ELF environment, ar does not use temporary files, and this
              option is ignored.

       s      Force the regeneration of the archive symbol table even if ar
              is not invoked with a command which will modify the archive
              contents.  This command is useful to restore the archive
              symbol table after strip(1) or (mcs(1) has been used on the
              archive.  This key can be used only in combination with one of
              the keys [drqtpmx].

FILES
       $TMPDIR/*      temporary files

       $TMPDIR is usually /usr/tmp but can be redefined by setting the



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




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


       environment variable TMPDIR [see tempnam() in tmpnam(3S)].  In an ELF
       environment, ar no longer uses temporary files.

SEE ALSO
       ld(1), lorder(1), strip(1), mcs(1), a.out(4), ar(4).

NOTES
       By convention, archives are suffixed with the characters .a.

       If the same file is mentioned twice in an argument list, it may be
       put in the archive twice.














































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


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