Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

chgrp(1) OSS Shell and Utilities Reference Manual
NAME
chgrp - Changes the group ownership of a le or directory
SYNOPSIS
chgrp [ -W NOG ][-W NOE ][-fR] group le ...
The chgrp command changes the group associated with the specied le or directory to
group.
FLAGS
-f Suppresses all error reporting.
-R Causes chgrp to descend recursively through its directory arguments, setting the
specied group ID. When symbolic links are encountered, the group of the parent le
or directory is changed, but the group of linked les or directories is not changed. If
chgrp fails to change the group ID of a particular le in the hierarchy, it continues to
process the remaining les. If chgrp cannot read or process a directory in the hierar-
chy, it continues to process the other parts of the hierarchy.
HP Extensions
-W NOG Species that the /G directory should be omitted when the initial directory is root
and the recursive ag (-R) is used. This ag is ignored when the initial directory
is not /, /E,or/E/system or when recursion does not occur.
-W NOE Species that the /E directory should be omitted when the initial directory is root
and the recursive ag (-R) is used. This ag is ignored when the initial directory
is not root or when recursion does not occur.
Specify both the -W NOG and -W NOE ags to omit both the /G and /E directories.
DESCRIPTION
The effective user of the process must match the owner of the le.
Users can change the group of a le to a group that they belong to (their effective group or one of
their supplementary groups). If you do not own the le and do not belong to the new group, you
must have superuser authority to change the group name or group ID.
The group argument must be either a valid group name or a valid group ID that exists in the
group database. If a numeric group operand exists in the group database as a group name, the
group ID number associated with that group name is used as the group ID.
Environment Variables
The following environment variables affect the execution of the chgrp command:
UTILSGE Species that HP extensions to the root directory should be omitted when the ini-
tial directory is root and a recursive operation occurs in an OSS shell command.
Application programs that test this variable might also honor its settings.
The UTILSGE value can be any of the following:
NOE Omit the /E directory.
NOG Omit the /G directory.
NOG:NOE Omit both the /G and /E directories.
The effect of assigning a value to the UTILSGE environment variable is the
same as specifying the -W NOG or -W NOE ag in the command.
238 Hewlett-Packard Company 527188-004