tldr/pages/common/install.md

26 lines
873 B
Markdown
Raw Normal View History

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.
> More information: <https://www.gnu.org/software/coreutils/install>.
2016-12-21 23:37:17 +00:00
- Copy files to the destination:
2016-12-21 23:37:17 +00:00
`install {{path/to/source}} {{path/to/destination}}`
- Copy files to the destination, setting their ownership:
2016-12-21 23:37:17 +00:00
`install --owner {{user}} {{path/to/source}} {{path/to/destination}}`
2016-12-21 23:37:17 +00:00
- Copy files to the destination, setting their group ownership:
2016-12-21 23:37:17 +00:00
`install --group {{user}} {{path/to/source}} {{path/to/destination}}`
2016-12-21 23:37:17 +00:00
- Copy files to the destination, setting their `mode`:
2016-12-21 23:37:17 +00:00
`install --mode {{+x}} {{path/to/source}} {{path/to/destination}}`
2016-12-21 23:37:17 +00:00
- Copy files and apply access/modification times of source to the destination:
2016-12-21 23:37:17 +00:00
`install --preserve-timestamps {{path/to/source}} {{path/to/destination}}`