2016-12-21 23:37:17 +00:00
|
|
|
# install
|
|
|
|
|
|
|
|
> Copy files and set attributes.
|
|
|
|
> Copy files (often executable) to a system location like `/usr/local/bin`, give them the appropriate permissions/ownership.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/install>.
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
|
|
|
`install {{path/to/source}} {{path/to/destination}}`
|
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination, setting their ownership:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-11-10 08:51:46 +00:00
|
|
|
`install --owner {{user}} {{path/to/source}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination, setting their group ownership:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-11-10 08:51:46 +00:00
|
|
|
`install --group {{user}} {{path/to/source}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination, setting their `mode`:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-11-10 08:51:46 +00:00
|
|
|
`install --mode {{+x}} {{path/to/source}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files and apply access/modification times of source to the destination:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-11-10 08:51:46 +00:00
|
|
|
`install --preserve-timestamps {{path/to/source}} {{path/to/destination}}`
|