tldr/pages/common/chgrp.md

20 lines
468 B
Markdown
Raw Normal View History

2016-02-22 20:03:35 +00:00
# chgrp
> Change group ownership of files and folders.
- Change the owner group of a file/folder:
2016-02-22 20:03:35 +00:00
`chgrp {{group}} {{path/to/file}}`
- Recursively change the owner group of a folder and its contents:
2016-02-22 20:03:35 +00:00
`chgrp -R {{group}} {{path/to/folder}}`
- Change the owner group of a symbolic link:
2016-02-22 20:03:35 +00:00
`chgrp -h {{group}} {{path/to/symlink}}`
2016-02-22 20:03:35 +00:00
- Change the owner group of a file/folder to match a reference file:
2016-02-22 20:03:35 +00:00
2016-02-23 01:54:19 +00:00
`chgrp --reference={{path/to/reference_file}} {{path/to/file}}`