1
0
Files
irix-657m-src/eoe/man/man1/install.1
2022-09-29 17:59:04 +03:00

319 lines
7.7 KiB
Groff

'\"macro stdmacro
.if n .pH g1a.install @(#)install 30.4 of 12/25/85
.TH INSTALL 1
.SH NAME
install \- install files in directories
.SH SYNOPSIS
.B /sbin/install
.I options
.IR file\0 ...
.SH BSD/GNU SYNOPSIS
.B /sbin/install
.I options
.IR file\0... \0directory
.br
.B /sbin/install
.I options
file1 file2
.br
.B /sbin/install
.I options
.IR -d\0 directories\0...
.SH DESCRIPTION
.I Install
copies regular
.I files
generated in a source tree into a target directory.
It can also create directories, links and special files in a target directory.
The target directory's pathname will be prefixed by the value of the
.B \s-1ROOT\s+1
environment variable.
.I Install
is most commonly invoked from makefiles (see
.IR make (1)).
.PP
If the
.B \s-1RAWIDB\s+1
environment variable is set,
.I install
creates no files in target directories; instead, it appends records describing
the files that it would have created to the
installation database (IDB) named by
.BR \s-1$RAWIDB\s+1 .
When generating an IDB, either
.I install
must be invoked under a directory named
.BR src ,
or the
.B \s-1SRC\s+1
environment variable must be set and must name an ancestor of the
current working directory.
.PP
.IR Install 's
options specify how to install, what type of file to create, and where to
install in the target tree.
Options are collected from the
.B \s-1INSTOPTS\s+1
environment variable, then from the command line.
If incompatible options are specified in
.B \s-1INSTOPTS\s+1
and the command line, the command line options take precedence.
Note that single-letter options cannot be concatenated after a hyphen.
.PP
BSD/GNU compatibility (where the target file or directory
is the last argument) is supported in case none of the mandatory
arguments (-f, -F, or -dir) is provided. In this case the
.B \-s
option means strip.
.PP
The options are:
.TP 16
\-m \f2mode\fP
Set the mode of created files to
.IR mode ,
interpreted as an octal number.
The default mode for regular files and directories is 755.
The default mode for devices and named pipes is 666.
This option is ignored if given with
.B \-ln
or
.BR \-lns .
.TP 16
\-u \f2owner\fP
Set the owner of created files to
.IR owner ,
which is interpreted first as a user name, then as a numeric user ID if it
fails to match known user names.
If the superuser invokes
.IR install ,
the default owner is
.BR root .
Otherwise the default owner is the effective user ID of the invoker.
This option is ignored if given with
.BR \-ln .
If
.B $RAWIDB
is set, and
.B \-lns
is used, it is effectively ignored, because
.IR inst (1m)
does not support setting the owner on symlinks.
.TP 16
\-g \f2group\fP
Set the group of created files to
.IR group ,
which is interpreted first as a group name, then as a numeric group ID if it
fails to match known group names.
If the superuser invokes
.IR install ,
the default group is
.BR sys .
Otherwise the default group is the effective group ID of the invoker.
This option is ignored if given with
.BR \-ln .
If
.B $RAWIDB
is set, and
.B \-lns
is used, it is effectively ignored, because
.IR inst (1m)
does not support setting the group on symlinks.
.TP 16
\-idb \f2attribute\fP
Add an IDB
.I attribute
to the records for files which
.I install
would have created in its normal mode.
This option may occur several times among the option arguments.
.TP 16
\-new
By default,
.I install
creates a regular file with the same modification time (\f2mtime\fP)
as its source.
This option disables mtime preservation, resulting in each regular file
being installed with its mtime set by
.IR install 's
final write to it.
.TP 16
\-o
If a target exists, save it in the target directory with a hard link
named \f3\s-1OLD\s+1\fP\f2file\fP .
.TP 16
\-O
If the target exists, try to remove it.
If it cannot be unlinked, save it in the same manner as
.BR \-o .
.TP 16
\-rawidb \f2idbpath\fP
Change
.IR install 's
mode from file creation to IDB generation, so that it appends records
to the file named by
.IR idbpath .
This option overrides the
.B \s-1RAWIDB\s+1
environment variable.
.TP 16
\-root \f2rootpath\fP
Set the string prepended to all absolute pathnames created by install to
.IR rootpath .
This option overrides the
.B \s-1ROOT\s+1
environment variable.
.TP 16
\-s
Be silent.
Older versions of
.I install
printed verbose information by default when installing.
.I Install
is now silent by default, but this option remains for compatibility.
.TP 16
\-t
Symbolically link targets to sources when installing regular files.
.TP 16
\-v
Be verbose.
This option causes
.I install
to print a line telling source and target pathnames for each file installed.
.PP
Only one of the following options may be specified for a given invocation of
.IR install ,
to install non-regular files:
.TP 16
\-blk \f2maj,min[,off]\fP
Create a block device node with major device number
.I maj
and minor number
.IR min .
If
.I min
has the form
.IR lowmin\-highmin ,
.I install
creates block device nodes for minor numbers
.I lowmin
through
.IR highmin ,
inclusive, forming each node's name by concatenating
.I file
and the minor device number.
If the optional offset is given, it is added to the minor
number (the offset may be negative).
This is primarily useful with the range form in scripts, such as
.BR /dev/MAKEDEV .
If the device exists, with the correct type (block), and
correct major and minor number, it is left as is, and
the ownership and permissions are left unchanged. This
also is useful in scripts where you want to make sure that the device
exists, but want to preserve any local changes in owner and
permissions.
The
.B -O
and
.B -o
options are not supported with this option.
.TP 16
\-chr \f2maj,min[,off]\fP
Like
.BR \-blk ,
but creates character device nodes.
.TP 16
\-c
BSD old compatibility mode (ignored)
.TP 16
\-dir (or -d for BSD/GNU compatibility)
Create directories named by concatenating
.B \s-1$ROOT\s+1
to the
.I file
arguments. When -dir is given, all the
.I file
arguments are taken as directories; files and directories may not both
be installed with the same command.
.TP 16
\-fifo
Create named pipes named by the
.I file
arguments.
.TP 16
\-ln \f2path\fP
Create hard links named by the
.I file
arguments to the node named by \f2path\fP. If
\f2path\fP is a file, it will be linked to
.IR file .
If you want the link to be from a
file in the directory of the
.IR -f \ and\ -F
options you must preceed it by the
same directory string as for those options.
.TP 16
\-lns \f2path\fP
Create symbolic links named by the
.I file
arguments which point to \f2path\fP. If \f2path\fP is a
relative pathname, the symbolic link will
also be relative to the directory of
the
.IR -f \ and\ -F
options.
.PP
This option may be used only when installing regular files:
.TP 16
\-src \f2path\fP
Use
.I path
as the source file's pathname when installing a regular file.
This option is useful for renaming a source file in the target directory.
.PP
One of the following two options must be used unless installing directories
with
.BR \-dir :
.TP 16
\-f \f2dir\fP
Install files in the target directory
.BR \s-1${ROOT}\s+1\f2dir\fP .
.TP 16
\-F \f2dir\fP
Like
.IR \-f ,
but creates any directories in the target
pathname which do not exist.
.SH EXAMPLES
To install several programs, issue:
.PP
.Ex
install -f /etc mount umount
.Ee
.PP
To install a file which has a different name in the target tree, and which
might be executing during installation, use:
.PP
.Ex
install -F /etc -src Install -O install
.Ee
.PP
This invocation creates disk device nodes, along with necessary directories:
.PP
.Ex
install -F /dev/dsk -m 600 -u root -g sys -blk 4,0-15 ips0d0s
.Ee
.PP
BSD/GNU compatibility example:
.PP
.Ex
install -m 775 -s file1 file2 file3 /usr/gnu/bin
.Ee
.SH SEE ALSO
make(1).
.SH BSD/GNU COMPATIBILITY NOTES
.BR
.nf
o GNU long options (e.g. --help) aren't supported.
o If strip is not installed, -s will give a warning (of course).
.fi