The chgrp command is used to change the group ownership of a file or directory. Changing the group ownership of an object ensures that the group permissions are applied to the specific group.


The syntax of the chgrp command is:

# chgrp {group name} {file/ directory name}

chgrp Command Examples

1. To change the files group:

2. To see the status if the files group has been changed after firing the command:

# chgrp -c SUPPORt file.txt

3. To suppress any errors while changing:

# chgrp -f SUPPORT file.txt

4. To change the groups recursively:

5. To see the verbose output for every change is being made by command:

# chgrp -v SUPPORt file.txt