ar.1 (2010 09)

a
ar(1) ar(1)
x Extract the named files. If no names are given, all files in the archive are extracted. In nei-
ther case does x alter entries from the archive file.
The following list describes the optional modifier characters:
a Position the files after the existing positioning file specified by posname .
b Place the new files before the existing positioning file specified by posname .
c Suppress the message normally produced when afile is created. For
r and q operations, ar
normally creates afile if it does not already exist.
f Truncate the named file names to 14 bytes before performing operations on an archive. This
modifier has been provided for compatibility with previous releases where file names up to a
maximum of 14 bytes were supported. Longer file names were truncated. When used with the
r operation, the first existing file that matches the truncated file name is replaced. The
f
modifier can also be used with other operations to allow the full file names to be specified,
rather than the truncated file names. Also see the description of the
F modifier.
i Place the new files before the existing positioning file specified by posname . Identical to the
b
modifier.
l Place temporary files in the local current working directory rather than in the directory
specified by the environment variable TMPDIR or in the default directory /var/tmp. Only
the d, m, q, and r operations and the s and F modifiers use temporary files.
s Regenerate the archive symbol table even if ar is not invoked with an operation that modifies
the archive contents. This modifier is useful for restoring the archive symbol table after the
strip command has been used on the archive (see strip (1)) or after the archive has been
modified using the z modifier.
u Update the archive. (r operations only) Do not copy the local file to the archive unless the
local file is newer than the corresponding existing file in the archive.
v Give a verbose file-by-file description of the creation or modification of an archive file to the
standard output. When used with t, v gives a long listing of all information about the files.
When used with the d, m, p, q,orx operations, the verbose modifier causes
ar to print each
key operation character and the file name associated with that operation. For the
r operation,
ar shows an a if it adds a new file or an r if it replaces an existing one. For the
p operation,
ar prints the name of the file to the standard output before the contents of the file are printed.
z Suppress the rebuilding of the symbol table when the archive is modified. This modifier is use-
ful only to avoid long build times when creating a large archive piece-by-piece. If an existing
archive contains a symbol table, the z modifier will cause it to be invalidated. If a file name
longer than 15 bytes is given the entire archive is rewritten. To rebuild the symbol table,
either use the ranlib command (see ranlib (1)), or invoke ar again with the s modifier.
A Suppress warning messages regarding optional access control list entries. ar does not archive
optional access control list entries in a file’s access control list (see acl (5)). Normally, a warn-
ing message is printed for each file having optional access control list entries.
C Prevent extracted files from replacing files with the same name. The C modifier can only be
used with the x operation.
F Truncate the entire archive. The F modifier causes the entire archive to be rewritten such that
all file names within the archive are truncated to 14 bytes, even when ar does not modify the
archive contents. The long name table will be removed (see ar(4)). This modifier has been pro-
vided for compatibility with previous releases where file names up to a maximum of 14 bytes
were supported. Also see the description of the f modifier.
T Truncate file names whose archive names are longer than those supported by the file system.
By default, files with names longer than those supported by the file system will not be
extracted and will cause an error. The T modifier can only be used with the x operation.
Only the following combinations are meaningful; no other combination of modifiers with operations have
any effect on the operation:
d: v, f, F, l
m: v, f, F, l, and a | b | i
r: v, f, F, l, c, A, u, and a | b | i
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010