2016-02-22 20:03:35 +00:00
|
|
|
# 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:
|
|
|
|
|
2016-02-23 01:54:19 +00:00
|
|
|
`chgrp --reference={{path/to/reference_file}} {{path/to/file}}`
|