install

Name

install -- copy files and set attributes

Synopsis

install [option...] SOURCE DEST
install [option...] SOURCE... DEST
install [-d | --directory] [option...] DIRECTORY...

Description

In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to the existing DEST directory, optionally setting permission modes and file ownership. In the third format, each DIRECTORY and any missing parent directories shall be created.

Standard Options

--backup[=METHOD]

makes a backup of each existing destination file. METHOD may be one of the following:

none or off 

never make backups.

numbered or t 

make numbered backups. A numbered backup has the form "%s.~%d~", target_name, version_number. Each backup shall increment the version number by 1.

existing or nil 

behave as numbered if numbered backups exist, or simple otherwise.

simple or never 

append a suffix to the name. The default suffix is '~', but can be overriden by setting SIMPLE_BACKUP_SUFFIX in the environment, or via the -S or --suffix option.

If no METHOD is specified, the environment variable VERSION_CONTROL shall be examined for one of the above. Unambiguous abbreviations of METHOD shall be accepted. If no METHOD is specified, or if METHOD is empty, the backup method shall default to existing.

If METHOD is invalid or ambiguous, install shall fail and issue a diagnostic message.

-b

is equivalent to --backup=existing.

-d, --directory

treats all arguments as directory names; creates all components of the specified directories.

-D

creates all leading components of DEST except the last, then copies SOURCE to DEST; useful in the 1st format.

-g GROUP, --group=GROUP

if the user has appropriate privilege, sets group ownership, instead of process' current group. GROUP is either a name in the user group database, or a positive integer, which shall be used as a group-id.

-m MODE, --mode=MODE

sets permission mode (specified as in chmod), instead of the default rwxr-xr-x.

-o OWNER, --owner=OWNER

if the user has appropriate privilege, sets ownership. OWNER is either a name in the user login database, or a positive integer, which shall be used as a user-id.

-p, --preserve-timestamps

copies the access and modification times of SOURCE files to corresponding destination files.

-s, --strip

strips symbol tables, only for 1st and 2nd formats.

-S SUFFIX, --suffix=SUFFIX

equivalent to --backup=existing, except if a simple suffix is required, use SUFFIX.

--verbose

prints the name of each directory as it is created.

-v, --verbose

print the name of each file before copying it to stdout.