INSTALL(1) — USER COMMANDS
NAME
install − install files
SYNOPSIS
install [ −c ] [ −m mode ] [ −o owner ] [ −g group ] [ −s ] binary destination
DESCRIPTION
binary is copied to destination. If destination already exists, it is removed before binary is copied. If the destination is a directory then binary is copied into file destination/binary.
install refuses to move a file onto itself.
Note: install has no special privileges since it simply uses cp to copy files from one place to another. The implications of this are:
•You must have permission to read binary.
•You must have permission to copy into destination.
•You must have permission to change the modes on the final copy of the file if you want to use the −m option to change modes.
•You must be super-user if you want to use the −o option to change ownership.
OPTIONS
−c Copy binary instead of moving it. In fact, install always copies the file, but the −c option is retained for backwards compatibility with old system shell scripts which might otherwise break.
−m mode
Specifies a different mode for binary: the mode for destination is set to 755 by default.
−o owner
Set the owner of the destination file to owner. destination is changed to owner root by default.
−g group
Set the group ownership of the destination file to group. destination is changed to group staff by default.
−s Strip binary files after it is installed — only applicable to binary files in a.out(5) format.
SEE ALSO
chmod(1V), cp(1), mv(1), strip(1), chown(8)
BUGS
Should be possible to move multiple files at a time, like mv or cp.
When the destination is a directory, install simply appends the entire source file name to the directory name, instead of using the source file name’s last component like mv or cp.
Sun Release 3.2 — Last change: 23 September 1985