mirror of https://github.com/CrimsonTome/tldr.git
20 lines
385 B
Markdown
20 lines
385 B
Markdown
|
# chown
|
||
|
|
||
|
> Change the owning user/group of the specified files
|
||
|
|
||
|
- change the user of a file
|
||
|
|
||
|
`chown {{user}} {{path/to/file}}`
|
||
|
|
||
|
- change the user and group of a file
|
||
|
|
||
|
`chown {{user}}:{{group}} {{path/to/file}}`
|
||
|
|
||
|
- recursively change the owner of an entire folder
|
||
|
|
||
|
`chown -R {{user}} {{path/to/folder}}`
|
||
|
|
||
|
- change the owner of a symbolic link
|
||
|
|
||
|
`chown -h {{user}} {{path/to/symlink}}`
|