chgrp Command Examples

Change group ownership of files and directories. More information: https://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html.

chgrp {{group}} {{path/to/file_or_directory}}

chgrp -R {{group}} {{path/to/directory}}

chgrp -h {{group}} {{path/to/symlink}}

chgrp --reference {{path/to/reference_file}} {{path/to/file_or_directory}}