Go to the first, previous, next, last section, table of contents.


install: Copy files and set attributes

install copies files while setting their permission modes and, if possible, their owner and group. Synopses:

install [option]... source dest
install [option]... source... directory
install -d [option]... directory...

In the first of these, the source file is copied to the dest target file. In the second, each of the source files are copied to the destination directory. In the last, each directory (and any missing parent directories) is created.

install is similar to cp, but allows you to control the attributes of destination files. It is typically used in Makefiles to copy programs into their destination directories. It refuses to copy files onto themselves.

The program accepts the following options. Also see section Common options.

`-b'
`--backup'
Make backups of files that are about to be overwritten or removed. See section Backup options.
`-c'
Ignored; for compatibility with old Unix versions of install.
`-d'
`--directory'
Create each given directory and any missing parent directories, setting the owner, group and mode as given on the command line or to the defaults. It also gives any parent directories it creates those attributes. (This is different from the SunOS 4.x install, which gives directories that it creates the default attributes.)
`-g group'
`--group=group'
Set the group ownership of installed files or directories to group. The default is the process's current group. group may be either a group name or a numeric group id.
`-m mode'
`--mode=mode'
Set the permissions for the installed file or directory to mode, which can be either an octal number, or a symbolic mode as in chmod, with 0 as the point of departure (see section File permissions). The default mode is 0755--read, write, and execute for the owner, and read and execute for group and other.
`-o owner'
`--owner=owner'
If install has appropriate privileges (is run as root), set the ownership of installed files or directories to owner. The default is root. owner may be either a user name or a numeric user ID.
`-s'
`--strip'
Strip the symbol tables from installed binary executables.
`-S suffix'
`--suffix=suffix'
Append suffix to each backup file made with `-b'. See section Backup options.
`-V method'
`--version-control=method'
Change the type of backups made with `-b'. The method argument can be `numbered' (or `t'), `existing' (or `nil'), or `never' (or `simple'). See section Backup options.


Go to the first, previous, next, last section, table of contents.