 |
Index for Section 1 |
|
 |
Alphabetical listing for A |
|
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 Tru64 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 standards
as follows:
ar: XPG4-UNIX
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
OPTIONS
The following options are supported:
-a Positions new files in the archive after the existing file named by the
posname parameter.
-b Positions new files in the archive before the existing file named by
the posname) parameter.
-c Suppresses the diagnostic message that the archiver prints when it
creates the specified archive file.
-C Prevents extracted files from replacing like-named files in the file
system. This option is useful when -T is also used, to prevent
truncated file names from replacing files with the same prefix.
-d Deletes the specified files from the archive file.
-h [Compaq] Sets the file modification times in the member 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 headers.
-i Positions new files in the archive before the existing file named by
the posname) parameter (equivalent to -b).
-l Places temporary files in the local current working directory, instead
of in the directory specified by the environment variable TMPDIR or in
the default directory.
This option is scheduled to be withdrawn from a future version of the
X/Open CAE Specification.
-m 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.
-o [Compaq] Forces a newly created file to have the `last modified' date
that it had before it was extracted from the archive.
-p 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.
-q 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.
-r Replaces or adds the specified files to archive. If the archive named
by archive does not exist, a new archive file is created. Files that
replace existing files do not change the order of the archive. New
files are appended to the archive.
-R [Compaq] 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.
-s [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.
-t 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.
-T Allows filename 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.
-u 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.
-v Gives verbose output. When used with options -d, -r, or -x, writes a
detailed file-by-file description 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.
-w [Compaq] Displays the archive symbol table. Each symbol is listed
with the name of the archive member that defines the symbol.
-x 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 modification 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.
-z [Compaq] Suppresses symbol table building.
-Z [Compaq] 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 update
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 created.
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 unless
you own the extracted file or you are the superuser.
The -s suboption is not operative as ar will always build the hash table by
default unless the -z suboption is specified.
ENVIRONMENT VARIABLES
The following environment variables affect the behavior of ar():
LANG
Provides a default value for the locale category variables that are not
set or null.
LC_ALL
If set, overrides the values of all other locale variables.
LC_CTYPE
Determines the locale for the interpretation of byte sequences as
characters (single-byte or multibyte) in input parameters and files.
LC_MESSAGES
Determines the locale used to affect the format and contents of
diagnostic messages displayed by the command.
LC_TIME
Determines the format and content for date and time strings written by
ar -tv.
NLSPATH
Determines the location of message catalogs for processing of
LC_MESSAGES.
TMPDIR
Determines the pathname that overrides the default directory for
temporary files, if any.
FILES
/tmp/v*
Temporary files
SEE ALSO
Commands: lorder(1), ld(1)
Files: ar(4)
Standards: standards(5)