AR(1) — UNIX Programmer’s Manual
NAME
ar − archive and library maintainer
SYNOPSIS
ar key [ posname ] afile name ...
DESCRIPTION
Ar maintains groups of files combined into a single archive file. Ar’s main function is to create and update library files used by the loader. However, Ar can be also used for any similar purpose. This version of ar uses a ASCII-format archive which is portable among the various machines running UNIX. Programs for operating with older formats are available: see old(8).
Key is one character from the set drqtpmx, optionally concatenated with one or more of vuaibcl. Afile is the archive file. The names are constituent files in the archive file. The meanings of the key characters are as follows:
d Delete the named files from the archive file.
r Replace the named files in the archive file. If the optional character u is used with r, only those files with modified dates later than the archive files are replaced. If an optional positioning character from the set abi is used, the posname argument must be present and specifies new files are to be placed after (a) or before (b or i) posname; otherwise, new files are placed at the end.
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. This command is useful only to avoid quadratic behavior when creating a large archive piece-by-piece.
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.
p Print the named files in the archive.
m Move the named files to the end of the archive. If a positioning character is present, the posname argument must be present and, as with r, this command specifies where the files are to be moved.
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.
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, v gives a complete listing of all information about the files. When used with p, v precedes each file with a name.
c Create. Normally, ar creates a file when required. The create option suppresses the normal message produced when a file is created.
l Local. Normally, ar places its temporary files in the directory /tmp. This option causes the files to be placed in the local directory.
FILES
/tmp/v\(**temporaries
SEE ALSO
lorder(1), ld(1), ranlib(1), ar(5), arcv(8), old(8)
BUGS
If the same file is mentioned twice in an argument list, it may be placed in the archive twice.
4th Berkeley Distribution — @(#)ar.11.1%Q%%Y%