Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
ar(1) OSS Shell and Utilities Reference Manual
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.
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 128,073,728 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.
• If the -p flag is used with the -v flag, ar precedes the contents of each file with:
"\n%s\n\n", file
where file is the file operand specified on the command line if file operands were
specified, or the name of the file in the archive if the file operands were not specified.
• If the -r flag is used with the -v flag and the file specified in the file operand is already in
the archive, the standard output is:
"r - %s\n", file
where file is the file operand specified on the command line.
1−10 Hewlett-Packard Company 527188-004