Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
ar(1) OSS Shell and Utilities Reference Manual
-p Writes the contents of the named files from archive to the standard output file. If
no files are specified, the contents of all files in the archive are written in the
order they occur in the archive.
-q Quickly appends the named files to the end of the archive file. The ar command
does not check whether the appended files already exist in the archive. ar is use-
ful if you want to bypass the search process that is otherwise done when a large
archive is created piece by piece.
-r Replaces or adds files to an archive. If the archive named in the archive operand
does not exist, a new archive file is created and a diagnostic message is written
to the standard error file (unless the -c flag is specified). If no files are specified
and the archive exists, no changes are made to the archive. Files that replace
existing files do not change the order of the archive. Files that do not replace
existing files are appended to the end of the archive.
-s Forces the regeneration of the archive symbol table even if ar is not invoked
with a flag that modifies the archive file contents.
-t Writes a table of contents for the library to the standard output file. The files
specified by the file operands are included in the written list. If no file operands
are specified, all files in the archive given by the archive operand are included in
the order of the archive.
-T Allows truncation of names of files whose archive names are longer than 255
characters. 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 by copying to the archive only those files that have changed
since they were last entered into the archive. When used with the -r flag, -u
allows files in the archive to be replaced only by files having more recent
modification times.
-v Writes to the standard output file a verbose description of a library. When the -v
flag is used with flags -d, -r,or-x, it writes a file-by-file description of the
archive operations as they are performed.
When -v is used with the -p flag, it writes the name of the file to the standard out-
put file before it writes the file to the standard output file.
When -v is used with the -t flag, it writes a detailed list of information about each
file, including access, ownership, size, and time, to the standard output file.
-Wfiletype Displays the file type. When specified with -tv flags, it displays [elf-non PIC]
for TNS/R native object files that are not position-independent code (non-PIC),
[elf PIC] for TNS/R PIC native linkfiles or native load files, [tnse 32-bit] for
TNS/E native object files of 32-bit data model, [tnse 64-bit] for TNS/E native
object files of 64-bit data model, [tnse neutral] for TNS/E native object files of
neutral data model, [tns] for TNS and accelerated object files, or nothing for
other file types such as text files. Use this flag when ar cannot generate the sym-
bol table because native linkfiles or loadfiles are mixed with TNS or accelerated
object files, or when TNS/E native object files of 32-bit and 64-bit data models
are mixed.
1−8
Hewlett-Packard Company 527188-021