chgrp

change the group ownership of files and/or directories 

Command


SYNOPSIS

chgrp [-fR] group pathname ...


DESCRIPTION

chgrp sets the group ID to group for the files and directories named by the pathname arguments. group may be a group name from the group database, or a numeric group ID.

Options

-f 

does not issue an error message if chgrp cannot change the group ID. In this case, chgrp always returns a status of zero.

-R 

If a pathname on the command line is the name of a directory, chgrp changes the group ID of all files and subdirectories under that directory. If chgrp cannot change some file or subdirectory under the directory, it continues to try to change the other files and subdirectories under the directory, but exits with a non-zero status.


DIAGNOSTICS

Possible exit status values are:

0 

You specified -f, or chgrp successfully changed the group ownership of all the specified files and directories.

1 

Failure due to any of the following:

— unable to access a specified file
— unable to change the group of a specified file
— encountered a fatal error when you specified -R option
2 

Failure due to any of the following:

— the command line contained an unknown option or too few arguments
chgrp did not recognize the specified group


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems.

The -f option is an extension to the POSIX standard.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
chmod, chown


PTC MKS Toolkit 10.4 Documentation Build 39.