Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

ar(1) OSS Shell and Utilities Reference Manual
hour is equivalent to the %H format in the date command.
minute is equivalent to the %M format in the date command.
year is equivalent to the %Y format in the date command.
If the -x ag is used with the -v ag, the standard output format is:
"x - %s\n", le
where le is the le operand specied on the command line if le operands were
specied, or the name of the le within the archive le if the le operands were not
specied.
Standard Error
Messages from the ar command are only diagnostic messages. The diagnostic message about
creating a new archive le when the -c ag is not specied does not modify the exit status.
Output Files
Output is the normal archive le name with string "!arch\n" at the beginning.
EXAMPLES
1. The command
ar -rcv newlib a1.o a2.o a3.o a4.o
creates an archive le named newlib (if an archive le by that name does not already
exist) with the les a1.o, a2.o, a3.o, and a4.o as its members. If newlib already
exists and some of the les named a1.o, a2.o, a3.o, and a4.o are in the archive,
these les are replaced by the new les. Files that are not current members of the
archive are added to the end of the archive le. The -v ag causes a le-by-le replace-
ment or addition message to be displayed on the terminal when each operation is ini-
tiated.
2. The command
ar -tv newlib
displays a detailed table of contents of the archive newlib.
3. The command
ar -x oldlib x.o y.o
extracts member les x.o and y.o from the archive oldlib.
4. The command
ar -rb abc.o oldlib x.o y.o
adds new member les x.o and y.o to the archive le oldlib. The new les are
inserted in front of the existing member abc.o.
5. The command
ar -dv libmylib f1.0 f2.0
deletes les f1.0 and f2.0 from the archive libmylib.
FILES
ar.h Describes the le structure of archive les.
112 Hewlett-Packard Company 527188-003