Manual Page Result
0
Command: ar | Section: 1 | Source: Digital UNIX | File: ar.1.gz
ar(1) General Commands Manual ar(1)
NAME
ar - archive library maintainer
SYNOPSIS
ar -d [-v] [-l] archive file...
ar -h [-lv] [-s] archive [file...]
ar -m [-abilvzZ] [posname] archive file...
ar -p [-v] [-s] archive file...
ar -q [-clvzZ] archive file...
ar -r [-cuvzZ] [-abil] [posname] archive file...
ar -R [-lvzZ] [-s] archive
ar -t [-v] [-s] archive file...
ar -w [-lv] [-s] archive
ar -x [-v] [-osCT] archive file...
The token -- (double-dash) is accepted as a delimiter indicating the
end of options. Any following arguments are treated as operands, even
if they begin with the - character.
The following options and suboptions are DIGITAL UNIX extensions to the
standard ar utility:
Options: -h, -w, -R
Suboptions: -o, -z, -Z
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
ar: XPG4-UNIX
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
OPTIONS
The following options are supported: Positions new files in the archive
after the existing file named by the posname parameter. Positions new
files in the archive before the existing file named by the posname) pa-
rameter. Suppresses the diagnostic message that the archiver prints
when it creates the specified archive file. Prevents extracted files
from replacing like-named files in the file system. This option is use-
ful when -T is also used, to prevent truncated file names from replac-
ing files with the same prefix. Deletes the specified files from the
archive file. [DIGITAL] Sets the file modification times in the mem-
ber headers of the named files to the current date and time. If you do
not specify any filenames, ar sets the time stamps of all member head-
ers. Positions new files in the archive before the existing file named
by the posname) parameter (equivalent to -b). Places temporary files
in the local current working directory, instead of in the directory
specified by the environment variable TMPDIR or in the default direc-
tory.
This option is scheduled to be withdrawn from a future version
of the X/Open CAE Specification. Moves the specified files. The
-a, -b, or -i suboptions with the posname parameter indicate the
position. Otherwise, move the files to the end of the archive.
[DIGITAL] Forces a newly created file to have the `last modi-
fied' date that it had before it was extracted from the archive.
Prints the contents of the specified files from the archive. If
no files are specified, the contents of all files are printed in
the order of the archive. Quickly appends the specified files
to the end of the archive file. The archiver does not check
whether the added members are already in the archive. This is
useful to bypass the searching otherwise done when creating a
large archive piece by piece. Replaces or adds the specified
files to archive. If the archive named by archive does not ex-
ist, a new archive file is created. Files that replace existing
files do not change the order of the archive. New files are ap-
pended to the archive. [DIGITAL] Replicates the entire
archive, transferring each file in the archive to the replica in
uncompressed form. If the -Z option is also specified, each file
in the archive is transferred to the replica in compressed form.
[XPG4-UNIX] Makes a symbol definition (symdef file) as the
first file of an archive. This file contains a hash table of
ranlib structures and a corresponding string table. If you
change the archive contents, the symdef file becomes obsolete
because archive file symbols change. The ar command builds the
symbol table by default. Prints a table of contents for the
files in archive. The table includes the files specified by the
file operands. If no file names are specified, all files in
archive are included in the order of the archive. Allows file-
name truncation of extracted files whose archive names are
longer than the file system can support. By default, extracting
a file with a name that is too long is an error; a diagnostic
message is written and the file is not extracted. Updates older
files. When used with the -r option, files within the archive
are replaced only if the corresponding file has a modification
time that is at least as new as the modification time of the
file within the archive. Gives verbose output. When used with
options -d, -r, or -x, writes a detailed file-by-file descrip-
tion of the archive creation and maintenance activity.
When used with option -p, the archiver precedes each file with a
name.
When used with option -t, the archiver lists all information
about the files in the archive, indicating that a file has been
compressed by placing a "Z" in the column that precedes the
filename. [DIGITAL] Displays the archive symbol table. Each
symbol is listed with the name of the archive member that de-
fines the symbol. Extracts the specified files from the
archive. The contents of the archive is not changed. If no file
names are given, the archiver extracts all files. The modifica-
tion time of each file extracted is set to the time the file is
extracted from the archive, unless the -o option is also used.
In this case, the archiver resets the `last-modified' date to
the date recorded in the archive. [DIGITAL] Suppresses symbol
table building. [DIGITAL] Compresses each file as it is added
to the archive.
DESCRIPTION
The (ar) utility creates and maintains groups of files combined into a
single archive file. Generally, you use this utility to create and up-
date library files that the link editor uses; however, you can use the
archiver for any similar purpose.
When ar creates an archive, it creates administrative information in a
format that is portable across all machines. When the archive contains
at least one object file that ar recognizes as such, an archive symbol
table, which the link editor uses to search the archive file, is cre-
ated. Whenever ar is used to create or update the contents of such an
archive, the symbol table is rebuilt. The -s option forces the symbol
table to be rebuilt.
The ar(1) utility supports file names up to the operating system limit.
RESTRICTIONS
If you specify the same file twice in an argument list, it can appear
twice in the archive file.
The -o suboption does not change the `last-modified' date of a file un-
less you own the extracted file or you are the superuser.
The -s suboption is not operative as ar will always build the hash ta-
ble by default unless the -z suboption is specified.
ENVIRONMENT VARIABLES
The following environment variables affect the behavior of ar(): Pro-
vides a default value for the locale category variables that are not
set or null. If set, overrides the values of all other locale vari-
ables. Determines the locale for the interpretation of byte sequences
as characters (single-byte or multibyte) in input parameters and files.
Determines the locale used to affect the format and contents of diag-
nostic messages displayed by the command. Determines the format and
content for date and time strings written by ar -tv. Determines the
location of message catalogs for processing of LC_MESSAGES. Determines
the pathname that overrides the default directory for temporary files,
if any.
FILES
Temporary files
SEE ALSO
Commands: lorder(1), ld(1)
Files: ar(4)
Standards: standards(5)
ar(1)