HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

a
ar(1) ar(1)
p: v, f, F
, s
x
: v, f, F,
s, C, T
EXTERNAL INFLUENCES
Environment Variables
The following internationalization variables affect the execution of
ar:
LANG
Determines the locale category for native language, local customs and coded character set in the
absence of LC_ALL and other LC_* environment variables. If
LANG is not specified or is set to the
empty string, a default of
C (see lang(5)) is used instead of
LANG.
LC_ALL
Determines the values for all locale categories and has precedence over
LANG and other LC_*
environment variables.
LC_CTYPE
Determines the locale category for character handling functions.
LC_MESSAGES
Determines the locale that should be used to affect the format and contents of diagnostic messages
written to standard error.
LC_NUMERIC
Determines the locale category for numeric formatting.
LC_TIME
Determines the format and contents of date and time formatting.
NLSPATH
Determines the location of message catalogues for the processing of LC_MESSAGES .
If any internationalization variable contains an invalid setting,
ar behaves as if all internationalization
variables are set to
C. See environ(5).
In addition, the following environment variable affects ar:
TMPDIR
Specifies a directory for temporary files (see tmpnam(3S)). The l modifier overrides the
TMPDIR
variable, and TMPDIR overrides /var/tmp, the default directory.
DIAGNOSTICS
phase error on file name
The named file was modified by another process while ar was copying it into the archive.
When this happens, ar exits and the original archive is left untouched.
ar write error: file system error message
ar could not write to a temporary file or the final output file. If
ar was trying to write the
final output file, the original archive is lost.
ar reports cannot create file.a, where file.a is an ar-format archive file, even if file
.a already
exists. This message is triggered when file
.a is write-protected or inaccessible.
EXAMPLES
Create a new file (if one does not already exist) in archive format with its constituents entered in the order
indicated:
ar r newlib.a f3 f2 f1 f4
Replace files f2 and f3 such that the new copies follow file f1, and f3 follows f2:
ar ma f1 newlib.a f2 f3
ar ma f2 newlib.a f3
ar r newlib.a f2 f3
The archive is then ordered:
newlib.a: f1 f2’ f3’ f4
where the single quote marks indicate updated files. The first command says "move f2 and f3 after f1 in
newlib.a", thus creating the order:
Section 122 Hewlett-Packard Company 3 HP-UX 11i Version 1: September 2005