Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ar(XNX) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(XNX)

lorder(CP)

ar(FP)


 ar(XNX)                        6 January 1993                        ar(XNX)


 Name

    ar - maintains archives and libraries

 Syntax

    ar key [posname] afile names ...

 Description

    ar maintains groups of files combined into a single XENIX format archive
    file.  Its main use is to create and update library files as used by the
    link editor though it can be used for any similar purpose.

    key is one character from the set drqtpmx, optionally concatenated with
    one or more of vuaibcln.  afile is the archive file.  The names are con-
    stituent files in the archive file. These files can be any combination of
    XENIX format object files or COFF files.  The posname is the name of a
    constituent file, and is required when certain keys are used.  The mean-
    ings of the key characters are:

    d       Deletes the named files from the archive file.

    r       Replaces the named files in the archive file.  If the optional
            character u is used with r, then only those files with modified
            dates later than the archive files are replaced.  If an optional
            positioning character from the set abi is used, then 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 appends 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 archive.
            Useful only to avoid quadratic behavior when creating a large
            archive piece by piece.

    t       Prints 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       Prints the named files in the archive.

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

    x       Extracts the named files.  If no names are given, all files in
            the archive are extracted.  Unless the optional character n is
            used with x, an extracted file's modification date will be set to
            the date stored in that file's archive header.  In neither case
            does x alter the archive file.

    v       Verbose.  Under the verbose option, ar gives a file-by-file
            description of the making of a new archive file from the old
            archive and the constituent files.  When used with t, it gives a
            long listing of all information about the files.  When used with
            x, it precedes each file with a name.

    c       Create.  Normally ar will create afile when it needs to.  The
            create option suppresses the normal message that is produced when
            afile is created.

    l       Local.  Normally ar places its temporary files in the directory
            /tmp.  This option causes them to be placed in the local direc-
            tory.

    n       New. When used with the key character x it sets the extracted
            file's modification date to the current date.

    When ar creates an archive, it always creates the header in XENIX format
    (see ar(F).

 Files

    /tmp/v* Temporary files

 Notes

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

    If the archive contains OMF binaries, ranlib(XNX) must be used to convert
    the library to the proper format.  It is not necessary to run ranlib(XNX)
    if the archive contains COFF binaries.

    Failure to process a library with ranlib, or failure to reprocess a
    library with ranlib, will cause ld to fail.  Because generation of a
    library by ar and randomization by ranlib are separate, phase errors are
    possible.  The loader ld warns when the modification date of a library is
    more recent than the creation of its dictionary; but this means you get
    the warning even if you only copy the library.

 See also

    ld(XNX), lorder(CP), ar(FP)

 Standards conformance

    ar is conformant with:
    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


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