chgrp(1)
Name
chgrp − change file group
Syntax
chgrp [ −fR ] group file...
Description
The chgrp command changes the group ID of one or more files or directories. For file, you may specify either a full or partial path. For group, you may specify either a decimal GID or a group name found in the group file.
The user entering the chgrp command must either be the superuser, or be the owner of the file and belong to the specified group.
Options
−f Inhibits display of errors that are returned if chgrp fails to change the group identifier of a file.
−R Causes chgrp to recursively descend any directories subordinate to file and to set the specified group for each file encountered. When symbolic links are encountered, chgrp changes the group identifier of the link file but does not traverse the path associated with the link.
Examples
Change group to admin for filea and fileb:
chgrp admin filea fileb
Files
/etc/group
/etc/passwd
/etc/yp/src/group
/etc/yp/src/passwd