Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ install(1M) — GL2 W2.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

make(1)

chown(1)

chmod(1)

cp(1)

strip(1)

sh(1)

csh(1)

env(1)

environ(5)

INSTALL(1M)  —  Silicon Graphics

NAME

install − install commands

SYNOPSIS

install [−U SYS5] [−c dira] [−f dirb] [−i] [−n dirc] [−u user] [−g group] [−m mode] [−F] [−o] [−s] [−S] file [dirx ...]

install [−U BSD42] [−c] [−o owner] [−u user] [−g group] [−m mode] [−F] [−s] [−S] file destination

/etc/install ... 

DESCRIPTION

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. 

This install has all of the features of both the System V and BSD4.2 systems.  By default install recognizes the System V (and non-conflicting BSD4.2) flags.  This default may be overridden by defining an environment variable (see sh(1), csh(1), env(1), and environ(5)) called INSTALLSYS which may be set to BSD42 to operate in the BSD4.2 style; it may be set to SYS5 to specify System V style.  The style may also be specified on the command line with the -U flag followed by either SYS5 or BSD42, overriding both the default and environment specifications. 

Note that by default the System V style copies the file and does not change the modes of an existing file in the install directory.  BSD4.2 moves the file and does change the modes of an existing file in the install directory to mode 755 with an owner and group of bin.  In both styles, if any of the -u -o -g -m or -F flags are specified then the installed file is always chmoded, chgrped, and chowned. In BSD4.2 style, a -c flag will cause the file to be copied rather than moved.

If no options or directories (dirx ...) are given to the System V style install, it will search a set of default directories (/bin, /usr/bin, /etc, /lib, and /usr/lib, 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, 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 will be searched before the directories specified in the default list.

If the BSD4.2 style is selected then there must be exactly two arguments after any flags, the first being the file to install and the second being the destination.  The destination may be either the directory where the file should be installed or the entire pathname including the file name itself. 

Install refuses to move a file onto itself.  Options marked with † are particular to this implementation. 

The meanings of the System V style options are:

−cdira 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.  May be used alone or with the −s option. 

−fdirb 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.  May be used alone or with the −o or −s options. 

−i Ignores default directory list, searching only through the given directories (dirx ...). May be used alone or with any other options other than −c and −f. 

−ndirc 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.  May 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 moving it to OLDfile in the directory in which it was found.  This option is useful when installing a normally text busy file such as /bin/sh. 

−s Suppresses printing of messages other than error messages.  May be used alone or with any other options

−uuser† The user (owner) of the installed file is changed to user. This implies the -F flag.  By default the user is changed to bin if the file does not already exist in the install directory and left as it is otherwise. 

−ggroup†
The group of the installed file is changed to group. This implies the -F flag.  By default the group is changed to bin if the file does not already exist in the install directory and left as it is otherwise. 

−mmode†
The mode of the installed file is changed to mode. This implies the -F flag.  By default the mode is changed to 755 if the file does not already exist in the install directory and left as it is otherwise. 

-F† Force a chmod, chgrp, and a chown to be performed even if the file already exists in the install directory.  Unless specified otherwise, the mode will be set to 755 and the user and group will be set to bin.

−S† The binary is stripped of its symbol table after being installed (see strip(1)).

−Uunix† Install’s style will be that of the standard install on the UNIX version specified, where unix is either SYS5 for System V style or BSD42 for Berkeley Distribution 4.2 style. 

The meanings of the BSD 4.2 style options are:

−oowner
The owner (user) of the installed file is changed to owner. By default the owner is changed to be that of the person doing the installation.

−ggroup
The group of the installed file is changed to group. By default the group is changed to staff if root is doing the installation or to the group of the install directory otherwise. 

−mmode
The mode of the installed file is changed to 755. By default the mode is changed to 755.

−c The file is copied rather than moved. 

−s The binary is stripped of its symbol table after being installed (see strip(1)).

−uuser†
The user (owner) of the installed file is changed to user.

−S† The binary is stripped of its symbol table after being installed (see strip(1)).

−Uunix†
Install’s style will be that of the standard install on the UNIX version specified, where unix is either BSD42 for Berkeley Distribution 4.2 style or SYS5 for System V style. 

EXAMPLES

To install a new version of the program ls in whatever system directory it belongs in do

install ls

To install a new version of rogue in /usr/games do either

install -f /usr/games -u games -g games -m 4755 rogue

or

setenv INSTALLSYS BSD42
install -o games -g games -m 4755 rogue /usr/games

A new version of sh may be installed with

install -U SYS5 -o -f /bin sh

SEE ALSO

make(1), chown(1), chmod(1), cp(1), strip(1), sh(1), csh(1), env(1), environ(5)

DIAGNOSTICS

A non-zero exit code is returned on failure along with an error message. 

Version 2.4  —  May 08, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026