chgrp

NAME

chgrp - change group

SYNOPSIS

chgrp [-hR] group file ...

DESCRIPTION

The chgrp(1) utility sets the group identifier (ID) of the file named by each file operand to the group ID specified by the group operand. If file is a symbolic link, the group of the file referenced by the symbolic link is changed unless the -h option is used.

OPTIONS

-h
If file is a symbolic link, change the group of the symbolic link.
-R
Change the group ID for the file hierarchies rooted in the files instead of just the files themselves.

The group operand can be either a group name from the group database, or a numeric group ID. If a group name is also a numeric group ID, the operand is used as a group name.

The user invoking chgrp(1) must belong to the specified group and be the owner of the file, or have appropriate privileges.

DIAGNOSTICS

The chgrp(1) utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

chown(1)