chgrp Command Examples

Change group ownership of files and directories. More information: https://www.gnu.org/software/coreutils/chgrp.

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}}