Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
User Commands (a - b) ar(1)
NAME
ar - Creates and maintains archive files and libraries
SYNOPSIS
ar -d [-v][-l] archive file ...
ar -m [-aAbilv][position_name] archive file ... |
ar -p [-v][-s] archive [file ...]
ar -q [-clv] archive [file ...]
ar -r [-cuv][-abil][position_name] archive file ...
ar -t [-v][-s][-Wfiletype] archive [file ...]
ar -Wobey obey_file
ar -x [-v][-sCT] archive [file ...]
FLAGS
In an ar command, you can list selected flags together in one group on the command line, with
no spaces between them. You can precede this single flag list with a - (dash), but it is not
required.
You must specify at least one flag from the required-flag set dmpqrtx. You can also specify any
number of optional flags from the set abcilsuvCT. If you select a positioning flag (a, b,ori), you
must also specify the name of a file within the library (position_name) immediately following the
flag list and separated from it by a space.
-a Positions new files in the archive after the file identified by the position_name
operand.
-A Suppresses warning messages about optional access control list (ACL) entries. |
The ar utility does not archive optional ACL entries. If this flag is not set, a |
warning message is issued for each file that has optional ACL entries. For more |
information about ACLs, see the acl(5) reference page.
-b Positions new files in the archive before the file identified by the position_name
operand.
-c Suppresses the diagnostic message written to the standard error file by default
when the archive file archive is created.
-C Prevents extracted files from replacing like-named files in the file system. This
flag is useful with the -T flag to prevent truncated filenames from replacing files
with the same prefix.
-d Deletes the named files from the archive.
-i Positions new files in the archive before the file identified by the position_name
operand. (This flag is equivalent to the -b flag.)
-l Creates temporary files in the local current working directory, rather than in the
directory specified by the environment variable TMPDIR.
-m Moves the named files to some other position in the archive. By default, this flag
moves the named files to the end of the archive. Use the positioning flags (a, b,
or i) to specify a position other than the default position.
527188-007 Hewlett-Packard Company 1−7