Linux "chgrp" Command Line Options and Examples
change group ownership

Change the group of each FILE to GROUP. With --reference, change the group of each FILE to that of RFILE.


Usage:

chgrp [OPTION]... GROUP FILE...
    chgrp [OPTION]... --reference=RFILE FILE...




Command Line Options:

-c
like verbose but report only when a change is made
chgrp -c ...
-f
suppress most error messages
chgrp -f ...
-v
output a diagnostic for every file processed
chgrp -v ...
--dereference
affect the referent of each symbolic link (this is the default), rather than the symbolic link itself
chgrp --dereference ...
-h
affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink)
chgrp -h ...
--no-preserve-root
do not treat '/' specially (the default)
chgrp --no-preserve-root ...
--preserve-root
fail to operate recursively on '/'
chgrp --preserve-root ...
--reference
use RFILE's group rather than specifying a GROUP value
chgrp --reference ...
-R
operate on files and directories recursivelyThe following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, onlythe final one takes effect.
chgrp -R ...
-H
if a command line argument is a symbolic link to a directory, traverse it
chgrp -H ...
-L
traverse every symbolic link to a directory encountered
chgrp -L ...
-P
do not traverse any symbolic links (default)
chgrp -P ...
--help
display this help and exit
chgrp --help ...
--version
output version information and exitEXAMPLESchgrp staff /uChange the group of /u to "staff".chgrp -hR staff /uChange the group of /u and subfiles to "staff".AUTHORWritten by David MacKenzie and Jim Meyering.REPORTING BUGSGNU coreutils online help: <http://www.gnu.org/software/coreutils/>Report chgrp translation bugs to <http://translationproject.org/team/>COPYRIGHTCopyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
chgrp --version ...