AR(1) — User’s Manual — Commands
NAME
ar − archive and library maintainer
SYNOPSIS
ar drqtpmx [ vuaibclo ] [ posname ] afile name ...
DESCRIPTION
Ar maintains groups of files combined into a single archive/library file. It is normally used to create and update library files used by the loader; it can be used, though, for any similar purpose.
One of the mandatory keys (drqtpmx) must be used; it may be followed by one or more of the modifiers vuaibclo. Afile is the archive file. The names are constituent files in the archive file.
OPTIONS
d Delete the named files from the archive file.
r Replace the named files in the archive file.
q Quick append. Append the named files to the end of the archive file without searching the archive for duplicate names. Useful only to avoid quadratic behavior when creating a large archive piece-by-piece.
t Display a table of contents of the archive file. If no names are given, all files in the archive are listed; if names are given, only those files are listed.
p Display the named files in the archive.
m Move the named files to the end of the archive.
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.
MODIFIERS
v Verbose. Give a file-by-file description of the creation 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 p, it precedes each file with a name.
c Ar creates afile when it needs to, and displays a message to this effect. The c modifier suppresses this message.
l Local. Ar places its temporary files in the directory /tmp. The l modifier places them in the local directory.
o Old date. When files are extracted with the x option, o sets the “last modified” date to the date recorded in the archive.
u Replace only those files that have changed since they were put in the archive. Used with the r option.
a Place new files after posname (posname argument must be present). Applies only with the r and m options.
b Place new files before posname (posname argument must be present). Applies only with the r and m options.
i Identical to the b modifier.
FILES
/tmp/v∗temporaries
SEE ALSO
lorder(1), ld(1), ranlib(1), ar(5), arcv(8)
BUGS
If the same file is mentioned twice in an argument list, it is put in the archive twice.
The ‘last-modified’ date of a file will not be altered by the o option unless the user is either the owner of the extracted file or the super-user.
Sun System Release 0.3 — 28 April 1983