tldr/pages/common/install.md

26 lines
840 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 -o {{user}} {{path/to/source}} {{path/to/destination}}`
- Copy files to the destination, setting their group ownership:
2016-12-21 23:37:17 +00:00
`install -g {{user}} {{path/to/source}} {{path/to/destination}}`
- Copy files to the destination, setting their `mode`:
2016-12-21 23:37:17 +00:00
`install -m {{+x}} {{path/to/source}} {{path/to/destination}}`
- Copy files and apply access/modification times of source to the destination:
2016-12-21 23:37:17 +00:00
`install -p {{path/to/source}} {{path/to/destination}}`