Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ar(1) — Ultrix/UWS 4.2 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(1)

lorder(1)

ranlib(1)

ar(5)

arcv(8)

ar(1)  —  VAX

Name

ar − archive and library maintainer

Syntax

ar −key [posname] afile name...

Description

The ar command maintains groups of files combined into a single archive file. The ar command is used to create and update library files as they are used by the loader.

This version of ar uses a ASCII-format archive, which can be used by the various machines running UNIX.  Programs for dealing with older formats are also available.  For further information, see arcv(.).

The key is one character from the following set: d, r, q, t, p, m, x.  The key character can be concatenated with one or more of the following optional characters: v, u, a, i, b, c, l, o.  The afile is the archive file.  The names are constituent files in the archive file. 

Options

The OPTIONS section is divided into two sections:  the first section lists the key characters and their meanings, and the second section lists the optional characters and their meanings. 

For backward compatibility, the keys work without the dash (−).  The definitions of the key characters are as follows:

dDeletes the named files from the archive file. 

mMoves 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, it will specify where the files are to be moved. 

pPrints the named files in the archive. 

qAppends the named files to the end of the archive file.  Optional positioning characters are invalid.  The command does not check whether the added files are already in the archive.  The q option is used primarily to avoid quadratic behavior when you are creating a large archive piece-by-piece. 

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

tPrints a table of contents of the archive file.  If no names are given, all files in the archive are included in the table of contents.  If file names are specified, only those files are included in the table of contents. 

xExtracts the named files.  If no names are given, all files in the archive are extracted.  However, x does not alter the archive file.  Normally the last-modified date of each extracted file is the date when it is extracted. However, if o is used, the last-modified date is reset to the date recorded in the archive. 

The following optional characters can be used in conjunction with the key characters:

aTells the ar command that new files should be placed after posname. 

bTells the ar command that new files should be placed before posname. 

cSuppresses the message that is normally produced when afile is created. 

iTells the ar command that new files should be placed before posname. 

lPlaces files in the local directory.  If the l option is not used then the value of the environment symbol, TMPDIR, is used as the directory for temporary files.  If TMPDIR is not defined or if the directory it references is not writable then /tmp is used. 

oResets the last-modified date to the date recorded in the archive.  Normally the last-modified date is the date when the file was extracted. 

uReplaces only those files with last-modified dates later than the archive files.  See the r key character. 

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

Restrictions

The ar command truncates the filenames to 15 characters.

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

The last-modified date of a file is not altered by the o option if the user is not the owner of the extracted file or a super-user. 

Files

/tmp/v*temporaries

See Also

ld(1), lorder(1), ranlib(1), ar(5), arcv(8)

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