Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
ar(1) OSS Shell and Utilities Reference Manual
Multiple files within the archive file can be identically named. In these cases, each file and
position_name operand matches only the first archive file having a name that is the same as the
last component of the file or position_name operand.
An archive file can be created for the OSS, Guardian, or a target-independent execution environ-
ment. An OSS archive file is made up of OSS and target-independent object files. A Guardian
archive file is made up of Guardian and target-independent object files. A target-independent
archive file is made up of target-independent object files.
Text files are always target-environment independent.
If ar detects mixing of OSS and Guardian environment object files, it issues a warning message
but does not prevent you from creating an archive file of mixed environments. It is your respon-
sibility to ensure that procedures used for resolving references work in the target environment;
otherwise, program execution results in runtime errors.
If ar detects mixing of TNS/E native object files of 32-bit and TNS/E 64-bit data models, it
issues a warning message, but does not prevent you from creating an archive file.
The file structure of archive files is defined in the ar.h header file.
Operands
ar supports the following operands:
archive The pathname of the archive file to be created or modified.
The maximum size of an archive file is 1,024,491,520 bytes. If operations on the
archive file cause the file to exceed that size limit, the ar command returns an
error message and the archive file becomes corrupted because ar cannot create
the symbol table information.
file The pathname of a file to be processed. Only the last component of a pathname
is used in comparing the filename with names of files in the archive file. If two
or more file operands have the same last component in their pathname
(basename), they are all archived as separate members with the same name. ar
does not truncate valid filenames of files added to or replaced in the archive file.
position_name The name of a file within the archive file; used for relative positioning. See flags
-m and -r.
Environment Variables
The following environment variable affects the execution of ar.
TMPDIR Determines the pathname that overrides the default directory for temporary files,
if any.
This utility supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
Input Files
The input file identified in the archive operand must be a file in the format created by the com-
mand ar -r.
Standard Output
Standard output depends on the flags used with ar.
• If the -d flag is used with the -v flag, the standard output format is:
"d - %s \n", file
where file is the file operand specified on the command line.
1−10 Hewlett-Packard Company 527188-021