chgrp command in Linux is used to change the group ownership of a file or directory. … You can set the owner by using “chown” command, and the group by the “chgrp” command.
Is chgrp recursive?
To recursively change the group ownership of all files and directories under a given directory, use the -R option. Other options that can be used when recursively changing the group ownership are -H and -L . If the argument passed to chgrp command is a symbolic link, the -H option will cause the command to traverse it.
What is the difference between chown and chgrp?
The chown command is used to change file or directory ownership. … Actually the chown command can be used to change both user and group ownership, while the chgrp command can only be used to change group ownership.