Install
1. Role
The role of the install command is to install or upgrade software or to back up data, and it has access to all users.
2. Format
(1) Install [option] ... Source destination
(2) Install [option] ... Source... Directory
(3) install-d [option] ... Directory...
In the first two formats, the < source > copy to < destination > or multiple < source > files are copied to the existing < directory, while the permission mode and owner/owning group are set. In the third format, all of the specified directories and their home directories are created. Parameters that must be used with long options are also required when using short options.
3. Main parameters
--backup[=control]: A backup of each existing destination file.
-B: Similar to--backup, but does not accept any parameters.
-C: (This option is not processed).
-d,--directory: All parameters are processed as directories, and all home directories for the specified directory are created.
-D: Create all home directories before < destination >, and then copy < source > to < destination >;, which is useful in the first use format.
-g,--group= Group: Set the group you belong to, not the group that the process currently belongs to.
-m,--mode= mode: Set permission mode (like chmod) instead of rwxr-xr-x.
-o,--owner= owner: Self-setting owner (for Superuser only).
-p,--preserve-timestamps: The time attribute of the corresponding destination file with the access/modification time of the < source > file.
-s,--strip: Delete symbol table with the strip command, which applies only to the first and second use formats.
-s,--suffix= suffix: Specify the < suffix > of the backup file.
-v,--verbose: The name is printed when each file/directory is processed.
--help: Display this help information and leave.
--version: Displays version information and leaves. install-copy files and set attributes install, while making a copy, sets the attributes. So use the install command as much as possible in makefile. For example @install-D/usr/bin @install-P-d-m 0755 targets/usr/bin equivalent to @mkdir-P/usr/bin @cp targets/usr/bin @chmod 755/us R/bin/targets @touch/usr/bin/tagets <----update file timestamp install command strong. In addition, the @ prefix means that the result is not output from the console. This article from Csdn Blog, reproduced please indicate the source: http://blog.csdn.net/stevenliyong/archive/2009/10/13/4663583.aspx
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.