BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / ar.0
AR(1) UNIX Programmer's Manual AR(1)
N\bNA\bAM\bME\bE
ar - archive and library maintainer
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
a\bar\br key [ posname ] afile name ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bA_\br maintains groups of files combined into a single archive
file. Its main use is to create and update library files as
used by the loader. It can be used, though, for any similar
purpose. N\bN.\b.B\bB:\b: This version of _\ba_\br uses a ASCII-format
archive which is portable among the various machines running
UNIX. Programs for dealing with older formats are avail-
able: see _\ba_\br_\bc_\bv(8).
_\bK_\be_\by is one character from the set d\bdr\brq\bqt\btp\bpm\bmx\bx,\b, optionally con-
catenated with one or more of v\bvu\bua\bai\bib\bbc\bcl\blo\bo.\b. _\bA_\bf_\bi_\bl_\be is the archive
file. The _\bn_\ba_\bm_\be_\bs are constituent files in the archive file.
The meanings of the _\bk_\be_\by characters are:
d\bd Delete the named files from the archive file.
r\br Replace the named files in the archive file. If the
optional character u\bu is used with r\br,\b, then only those
files with `last-modified' dates later than the archive
files are replaced. If an optional positioning charac-
ter from the set a\bab\bbi\bi is used, then the _\bp_\bo_\bs_\bn_\ba_\bm_\be argument
must be present and specifies that new files are to be
placed after (a\ba) or before (b\bb or i\bi) _\bp_\bo_\bs_\bn_\ba_\bm_\be. Otherwise
new files are placed at the end.
q\bq 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 archive. Useful only to
avoid quadratic behavior when creating a large archive
piece-by-piece.
t\bt 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\bp Print the named files in the archive.
m\bm Move the named files to the end of the archive. If a
positioning character is present, then the _\bp_\bo_\bs_\bn_\ba_\bm_\be
argument must be present and, as in r\br,\b, specifies where
the files are to be moved.
x\bx Extract the named files. If no names are given, all
files in the archive are extracted. In neither case
does x\bx alter the archive file. Normally the `last-
Printed 7/9/88 April 29, 1985 1
AR(1) UNIX Programmer's Manual AR(1)
modified' date of each extracted file is the date when
it is extracted. However, if o\bo is used, the `last-
modified' date is reset to the date recorded in the
archive.
v\bv Verbose. Under the verbose option, _\ba_\br 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\bt,\b, it gives a long listing of all information
about the files. When used with p\bp, it precedes each
file with a name.
c\bc Create. Normally _\ba_\br will create _\ba_\bf_\bi_\bl_\be when it needs
to. The create option suppresses the normal message
that is produced when _\ba_\bf_\bi_\bl_\be is created.
l\bl Local. Normally _\ba_\br places its temporary files in the
directory /tmp. This option causes them to be placed
in the local directory.
F\bFI\bIL\bLE\bES\bS
/tmp/v* temporaries
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
lorder(1), ld(1), ranlib(1), ar(5), arcv(8)
B\bBU\bUG\bGS\bS
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 will not be altered by
the o\bo option if the user is not the owner of the extracted
file, or the super-user.
Printed 7/9/88 April 29, 1985 2