mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-12-26 18:32:41 +03:00
20 lines
443 B
Markdown
20 lines
443 B
Markdown
# chgrp
|
|
|
|
> Change group ownership of files and folders.
|
|
|
|
- Change the owner of a file/folder:
|
|
|
|
`chgrp {{group}} {{path/to/file}}`
|
|
|
|
- Recursively change the owner of a folder and its contents:
|
|
|
|
`chgrp -R {{group}} {{path/to/folder}}`
|
|
|
|
- Change the owner of a symbolic link:
|
|
|
|
`chgrp -h {{user}} {{path/to/symlink}}`
|
|
|
|
- Change the owner of a file/folder to match a reference file:
|
|
|
|
`chgrp --reference={{path/to/reference_file}} {{path/to/file}}`
|