chgrp Linux Commands
What is Linux chgrp Command?
chgrp COMMAND:chgrp command is used to change the group of the file or directory. This is an admin command. Root user only can change the group of the file or directory.
chgrp [options] newgroup filename/directoryname
||Change the permission on files that are in the subdirectories of the directory that you are currently in.
||Change the permission for each file.
||Force. Do not report errors.
chgrp hiox test.txt
The group of 'test.txt' file is root, Change to newgroup hiox.
chgrp -R hiox test
The group of 'test' directory is root. With -R, the files and its subdirectories also changes to newgroup hiox.
chgrp -c hiox calc.txt
They above command is used to change the group for the specific file('calc.txt') only.