install(1M) install(1M)
NAME [Toc] [Back]
install - install commands
SYNOPSIS [Toc] [Back]
/usr/sbin/install [-c dira] [-f dirb] [-i] [-n dirc] [-o] [-g group]
[-s] [-u user] file [dirx ...]
DESCRIPTION [Toc] [Back]
install is a command most commonly used in ``makefiles'' (see make(1))
to install a file (updated target file) in a specific place within a
file system. Each file is installed by copying it into the
appropriate directory, thereby retaining the mode and owner of the
original command. The program prints messages telling the user
exactly what files it is replacing or creating and where they are
going.
install is useful for installing new commands, or new versions of
existing commands, in the standard directories (i.e. /usr/bin,
/usr/sbin, etc.).
If no options or directories (dirx...) are given, install searches a
set of default directories (/usr/bin, /usr/sbin, /sbin, and /usr/lbin,
in that order) for a file with the same name as file. When the first
occurrence is found, install issues a message saying that it is
overwriting that file with file (the new version), and proceeds to do
so. If the file is not found, the program states this and exits
without further action.
If one or more directories (dirx ...) are specified after file, those
directories are searched before the directories specified in the
default list.
Options [Toc] [Back]
Options are interpreted as follows:
-c dira Installs a new command (file) in the directory
specified by dira, only if it is not found. If it
is found, install issues a message saying that the
file already exists, and exits without overwriting
it. Can be used alone or with the -s option.
-f dirb Forces file to be installed in given directory,
whether or not one already exists. If the file
being installed does not already exist, the mode
and owner of the new file will be set to 755 and
bin, respectively. If the file already exists,
the mode and owner will be that of the already
existing file. Can be used alone or with the -o
or -s options.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
install(1M) install(1M)
-i Ignores default directory list, searching only
through the given directories (dirx ...). Can be
used alone or with any other options other than -c
and -f.
-n dirc If file is not found in any of the searched
directories, it is put in the directory specified
in dirc. The mode and owner of the new file will
be set to 755 and bin, respectively. Can be used
alone or with any other options other than -c and
-f.
-o If file is found, this option saves the ``found''
file by copying it to OLDfile in the directory in
which it was found. This option is useful when
installing a normally busy text file such as
/usr/bin/sh or /usr/sbin/getty, where the existing
file cannot be removed. Can be used alone or with
any other options other than -c.
-g group Causes file to be owned by group group. This
option is available only to users who have
appropriate privileges. Can be used alone or with
any other option.
-u user Causes file to be owned by user user. This option
is available only to users who have appropriate
privileges. Can be used alone or with any other
option.
-s Suppresses printing of messages other than error
messages. Can be used alone or with any other
options.
When no directories are specified (dirx ...), or when file cannot be
placed in one of the directories specified, install checks for the
existence of the file /etc/syslist. If /etc/syslist exists, it is
used to determine the final destination of file. If /etc/syslist does
not exist, the default directory list is further scanned to determine
where file is to be located.
The file /etc/syslist contains a list of absolute pathnames, one per
line. The pathname is the "official" destination (for example
/usr/bin/echo) of the file as it appears on a file system. The file
/etc/syslist serves as a master list for system command destinations.
If there is no entry for file in the file /etc/syslist the default
directory list is further scanned to determine where file is to be
located.
Cross Generation [Toc] [Back]
The environment variable ROOT is used to locate the locations file (in
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
install(1M) install(1M)
the form $ROOT/etc/syslist). This is necessary in cases where cross
generation is being done on a production system. Furthermore, each
pathname in $ROOT/etc/syslist is appended to $ROOT (for example,
$ROOT/usr/bin/echo), and used as the destination for file. Also, the
default directories are also appended to $ROOT so that the default
directories are actually $ROOT/usr/bin, $ROOT/usr/sbin, $ROOT/sbin,
and $ROOT/usr/lbin.
The file /etc/syslist ($ROOT/etc/syslist) does not exist on a
distribution tape; it is created and used by local sites.
WARNINGS [Toc] [Back]
install cannot create alias links for a command (for example, vi(1) is
an alias link for ex(1)).
SEE ALSO [Toc] [Back]
make(1), cpset(1M).
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003 [ Back ] |