SysIII/usr/src/man/man1/ar.1

Compare this file to the similar file:
Show the results in this format:

.TH AR 1 
.SH NAME
ar \- archive and library maintainer
.SH SYNOPSIS
.B ar
key [ posname ] afile name ...
.SH DESCRIPTION
.I Ar\^
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.
.PP
.I Ar\^
can read archive files produced in either
.SM PDP\*S-11
or
.SM VAX\*S-11/780
format
(see
.IR ar (5)).
However, when
.I ar\^
creates an archive, it always creates the header in the format of
the local system.
A conversion program exists to convert
.SM PDP\*S-11
archives to
.SM VAX\*S-11/780
archive format (see
.IR arcv (1)).
This feature is useful only for source archive files.
Individual files are inserted without conversion into the archive file.
.PP
.I Key\^
is one character from the set
.BR drqtpmx ,
optionally concatenated with
one or more of
.BR vuaibcl .
.I Afile\^
is the archive file.
The
.I names\^
are constituent files in the archive file.
The meanings of the
.I key\^
characters are:
.TP
.B d
Delete the named files from the archive file.
.TP
.B r
Replace the named files in the archive file.
If the optional character
.B u
is used with
.BR r ,
then only those files with
modified dates later than
the archive files are replaced.
If an optional positioning character from the set
.B abi
is used, then the
.I posname\^
argument must be present
and specifies that new files are to be placed
after
.RB ( a )
or before
.RB ( b
or
.BR i )
.IR posname .
Otherwise
new files are placed at the end.
.TP
.B 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 archive.
Useful only to avoid quadratic behavior when creating a large
archive piece-by-piece.
.TP
.B 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.
.TP
.B p
Print the named files in the archive.
.TP
.B m
Move the named files to the end of the archive.
If a positioning character is present,
then the
.I posname\^
argument must be present and,
as in
.BR r ,
specifies where the files are to be moved.
.TP
.B x
Extract the named files.
If no names are given, all files in the archive are
extracted.
In neither case does
.B x
alter the archive file.
.TP
.B v
Verbose.
Under the verbose option,
.I 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
.BR t ,
it gives a long listing of all information about the files.
When used with
.BR x ,
it precedes each file with a name.
.TP
.B c
Create.
Normally
.I ar\^
will create
.I afile\^
when it needs to.
The create option suppresses the
normal message that is produced when
.I afile\^
is created.
.TP
.B l
Local.
Normally
.I ar\^
places its temporary files in the directory
.BR /tmp .
This option causes them to be placed in the local directory.
.SH FILES
/tmp/v\(**	temporaries
.SH SEE ALSO
arcv(1),
ld(1),
lorder(1),
ar(5).
.SH BUGS
If the same file is mentioned twice in an argument list,
it may be put in the archive twice.