Linux

Changing Groups: chgrp

The chgrp command-line utility allows you to change the group settings of a file. It works much like chown. The format of the command is as follows:

[root@local host ~]#chgrp <group name> <dir/file>
Example
I want to change the group name of the all files in max directory.
I want to assign new group name "thehard".
So
chgrp -R -v
chgrp -R -v

The -v option show all process human readable form -R apply to all file.
Now check the effect run command ls -l.
chgrp -R -v
chgrp -R -v

thehard the new group name. I hope you have understood the concept of chgrp.




admin