NAME
aarr - create and maintain library archives
SYNOPSIS
aarr -dd [-TTLLssvv] archive file ...
aarr -mm [-TTLLssvv] archive file ...
aarr -mm [-aabbiiTTLLssvv] position archive file ...
aarr -pp [-TTLLssvv] archive [file ...]
aarr -qq [-ccTTLLssvv] archive file ...
aarr -rr [-ccuuTTLLssvv] archive file ...
aarr -rr [-aabbcciiuuTTLLssvv] position archive file ...
aarr -tt [-TTLLssvv] archive [file ...]
aarr -xx [-oouuTTLLssvv] archive [file ...]
DESCRIPTION
The aarr utility creates and maintains groups of files combined into an ar-
chive. Once an archive has been created, new files can be added and
existing files can be extracted, deleted, or replaced.Files are named in the archive by a single component, i.e., if a file
referenced by a path containing a slash (``/'') is archived it will be
named by the last component of that path. When matching paths listed onthe command line against file names stored in the archive, only the last
component of the path will be compared.
All informational and error messages use the path listed on the commandline, if any was specified, otherwise the name in the archive is used.
If multiple files in the archive have the same name, and paths are listed
on the command line to ``select'' archive files for an operation, only
the first file with a matching name will be selected.The normal use of aarr is for the creation and maintenance of libraries
suitable for use with the loader (see ld(1)) although it is notrestricted to this purpose. The options are as follows:
-aa A positioning modifier used with the options -rr and -mm. The
files are entered or moved after the archive member position,
which must be specified.-bb A positioning modifier used with the options -rr and -mm. The
files are entered or moved before the archive member position,
which must be specified.-cc Whenever an archive is created, an informational message to that
effect is written to standard error. If the -cc option is speci-
fied, aarr creates the archive silently.
-dd Delete the specified archive files.
-ii Identical to the -bb option.
-mm Move the specified archive files within the archive. If one of
the options -aa, -bb or -ii are specified, the files are moved
before or after the position file in the archive. If none of
those options are specified, the files are moved to the end of
the archive.
-oo Set the access and modification times of extracted files to the
modification time of the file when it was entered into the ar-
chive. This will fail if the user is not the owner of theextracted file or the super-user.
-pp Write the contents of the specified archive files to the standard
output. If no files are specified, the contents of all the files
in the archive are written in the order they appear in the ar-
chive.-qq (Quickly) append the specified files to the archive. If the ar-
chive does not exist a new archive file is created. Much faster
than the -rr option, when creating a large archive piece-by-piece,
as no checking is done to see if the files already exist in thearchive.
-rr Replace or add the specified files to the archive. If the ar-
chive does not exist a new archive file is created. Files that
replace existing files do not change the order of the fileswithin the archive. New files are appended to the archive unless
one of the options -aa, -bb or -ii is specified.
-TT Select and/or name archive members using only the first fifteen
characters of the archive member or command line file name. The
historic archive format had sixteen bytes for the name, but some
historic archiver and loader implementations were unable to han-
dle names that used the entire space. This means that file namesthat are not unique in their first fifteen characters can subse-
quently be confused. A warning message is printed to the stan-
dard error output if any file names are truncated. (See ar(5)
for more information.)-LL Used the extended format to allow long archive member names.
This is the default.-ss Write an object-file index into the archive, or update an exist-
ing one, even if no other change is made to the archive. You may
use this modifier flag either with any operation, or alone. Run-
ning `ar s' on an archive is equivalent to running `ranlib' on
it.-SS Do not generate an archive symbol table. This can speed up
building a large library in several steps. The resulting archive
can not be used with the linker. In order to build a symbol ta-
ble, you must omit the S modifier on the last execution of ar, or
you must run ranlib on the archive.
-tt List the specified files in the order in which they appear in the
archive, each on a separate line. If no files are specified, all
files in the archive are listed.
-uu Update files. When used with the -rr option, files in the archive
will be replaced only if the disk file has a newer modificationtime than the file in the archive. When used with the -xx option,
files in the archive will be extracted only if the archive file
has a newer modification time than the file on disk.-vv Provide verbose output. When used with the -dd, -mm, -qq or -xx
options, aarr gives a file-by-file description of the archive modi-
fication. This description consists of three, white-space sepa-
rated fields: the option letter, a dash (``-'') and the file
name. When used with the -rr option, aarr displays the description
as above, but the initial letter is an ``a'' if the file is addedto the archive and an ``r'' if the file replaces a file already
in the archive.
When used with the -pp option, the name of each printed file is
written to the standard output before the contents of the file,
preceded by a single newline character, and followed by two new-
line characters, enclosed in less-than (``<'') and greater-than
(``>'') characters.
When used with the -tt option, aarr displays an ``ls -l'' style
listing of information about the members of the archive. This
listing consists of eight, white-space separated fields: the file
permissions (see strmode(3) ), the decimal user and group ID's,separated by a single slash (``/''), the file size (in bytes),
the file modification time (in the date(1) format ``%b %e %H:%M
%Y''), and the name of the file.
-xx Extract the specified archive members into the files named by the
command line arguments. If no members are specified, all the
members of the archive are extracted into the current directory.
If the file does not exist, it is created; if it does exist, theowner and group will be unchanged. The file access and modifica-
tion times are the time of the extraction (but see the -oo
option). The file permissions will be set to those of the filewhen it was entered into the archive; this will fail if the user
is not the owner of the extracted file or the super-user.
The aarr utility exits 0 on success, and >0 if an error occurs.
ENVIRONMENTTMPDIR The pathname of the directory to use when creating temporary
files. FILES/tmp default temporary file directory
ar.XXXXXX
temporary file names
CCOOMMPPAATTIIBBIILLIITTYYBy default, aarr writes archives that may be incompatible with historic ar-
chives, as the format used for storing archive members with names longer
than fifteen characters has changed. This implementation of aarr is back-
ward compatible with previous versions of aarr in that it can read and
write (using the -TT option) historic archives. The -TT option is provided
for compatibility only, and will be deleted in a future release. Seear(5) for more information.
STANDARDSThe aarr utility is expected to offer a superset of the IEEE Std 1003.2
(``POSIX.2'') functionality.SEE ALSO
ld(1), ranlib(1), strmode(3), ar(5)
Darwin July 27, 2005 Darwin