listing for A
ar - archive library maintainer
ar -d [-vV] [-l] archive file...
ar -h [-lvV] [-s] archive [file...]
ar -m [-abilvVzZ] [posname] archive file...
ar -p [-vV] [-s] archive file...
ar -q [-clvVzZ] archive file...
ar -r [-cuvVzZ] [-abil] [posname] archive file...
ar -R [-lvVzZ] [-s] archive
ar -t [-vV] [-s] archive file...
ar -w [-lvV] [-s] archive
ar -x [-vV] [-osCT] archive file...
ar -input file
The token -- (double-dash) is accepted as a delimiter indicating the end of
options. Any following arguments are treated as operands, even if they
begin with the - character.
The following options and suboptions are Tru64 UNIX extensions to the
standard ar utility:
Options: -h, -input, -w, -R
Suboptions: -o, -z, -Z
Interfaces documented on this reference page conform to industry standards
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
The following options are supported:
-a Positions new files in the archive after the existing file named by the
-b Positions new files in the archive before the existing file named by
the posname operand.
-c Suppresses the diagnostic message that the archiver prints when it
creates the specified archive file.
-C Prevents extracted files from replacing like-named files in the file
system. When -T is also used, this option is useful to prevent
truncated file names from replacing files with the same prefix.
-d Deletes the specified files from the archive file.
-h [Tru64 UNIX] Sets the file modification times in the member headers of
the named files to the current date and time. If you do not specify any
filenames, ar sets the time stamps of all member headers.
-i Positions new files in the archive before the existing file named by
the posname operand (equivalent to -b).
[Tru64 UNIX] Directs ar to read the contents of file file as if the
contents had been supplied on the command line.
Inside file, lines ending with a \ (backslash) are treated as
continuation lines, and lines starting with # are treated as comment
lines and ignored. The -v option can be used to display the expansion
of the command line resulting from the use of -input. The files can be
nested up to 20 levels.
-l Places temporary files in the local current working directory, instead
of in the directory specified by the environment variable TMPDIR or in
the default directory.
This option is scheduled to be withdrawn from a future version of the
X/Open CAE Specification.
-m Moves the specified files. The -a, -b, or -i suboptions with the
posname operand indicate the position. Otherwise, moves the files to
the end of the archive.
-o [Tru64 UNIX] Forces a newly created file to have the last-modified
date that it had before it was extracted from the archive.
-p Prints the contents of the specified files from the archive. If no
files are specified, the contents of all files are printed in the order
of the archive.
-q Quickly appends the specified files to the end of the archive file. The
archiver does not check whether the added members are already in the
archive. This is useful to bypass the searching otherwise done when
creating a large archive piece by piece.
-r Replaces or adds the specified files to the archive. If the archive
named by archive does not exist, a new archive file is created. Files
that replace existing files do not change the order of the archive. New
files are appended to the archive.
-R [Tru64 UNIX] Replicates the entire archive, transferring each file in
the archive to the replica in uncompressed form. If the -Z option is
also specified, each file in the archive is transferred to the replica
in compressed form.
-s [XPG4-UNIX] Makes a symbol definition file ("symdef" file) as the
first file of an archive. This file contains a hash table of ranlib
structures and a corresponding string table. If you change the archive
contents, the "symdef" file becomes obsolete because archive file
symbols change. The ar command builds the symbol table by default.
-t Prints a table of contents for the files in archive. The table includes
the files specified by the file operands. If no file names are
specified, all files in archive are included in the order in which they
appear in the archive.
-T Allows filename truncation of extracted files whose archive names are
longer than the file system can support. By default, extracting a file
with a name that is too long is an error; a diagnostic message is
written and the file is not extracted.
-u Updates older files. When used with the -r option, files within the
archive are replaced only if the corresponding file has a modification
time that is at least as new as the modification time of the file
within the archive.
-v Gives verbose output. When used with options -d, -r, or -x, writes a
detailed file-by-file description of the archive creation and
When used with option -p, the archiver precedes each file with a name.
When used with option -t, the archiver lists all information about the
files in the archive, indicating that a file has been compressed by
placing a "Z" in the column that precedes the filename.
-V Displays the version of the ar command.
-w [Tru64 UNIX] Displays the archive symbol table. Each symbol is listed
with the name of the archive member that defines the symbol.
-x Extracts the specified files from the archive. The contents of the
archive is not changed. If no file names are given, the archiver
extracts all files. The modification time of each file extracted is set
to the time the file is extracted from the archive, unless the -o
option is also used. In the case of the -o option, the archiver resets
the last-modified date to the date recorded in the archive.
-z [Tru64 UNIX] Suppresses symbol table building.
-Z [Tru64 UNIX] Compresses each file as it is added to the archive.
The archive being created or modified.
The name of a file member either in an archive or being added to an
The name of an archive file member.
The (ar) utility creates and maintains groups of files combined into a
single archive file. Generally, you use this utility to create and update
library files that the link editor uses; however, you can use the archiver
for any similar purpose.
When ar creates an archive, it creates administrative information in a
format that is portable across all machines. When the archive contains at
least one object file that ar recognizes as such, an archive symbol table,
which the link editor uses to search the archive file, is created. Whenever
ar is used to create or update the contents of such an archive, the symbol
table is rebuilt. The -s option forces the symbol table to be rebuilt.
The ar(1) utility supports file name lengths up to the limit supported by
the operating system.
If you specify the same file twice in an argument list, it can appear twice
in the archive file.
The -o suboption does not change the last-modified date of a file unless
you own the extracted file or you are the superuser.
The -s suboption is not operative as ar will always build the hash table by
default unless the -z suboption is specified.
The following environment variables affect the behavior of ar:
Provides a default value for the locale category variables that are not
If set, overrides the values of all other locale variables.
Determines the locale for the interpretation of byte sequences as
characters (single-byte or multibyte) in input parameters and files.
Determines the locale used to affect the format and contents of
diagnostic messages displayed by the command.
Determines the format and content for date and time strings written by
Determines the location of message catalogs for processing of
Determines the pathname that overrides the default directory for
temporary files, if any.
Commands: ld(1), lorder(1)
listing for A