• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

chgrp Command Examples in Linux

by admin

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.

Syntax

The syntax of the chgrp command is:

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

chgrp Command Examples

1. To change the files group:

# chgrp SUPPORT file.txt

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:

# chgrp -R SUPPORt /dir/

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

# chgrp -v SUPPORt file.txt

Filed Under: Linux

Some more articles you might also be interested in …

  1. partx: command not found
  2. chattr Command Examples to Change File Attributes (Make files immutable)
  3. ifconfig Command Examples in Linux
  4. pi: command not found
  5. “git mergetool” Command Examples
  6. fkill: Fabulously kill processes
  7. “git fetch” Command Examples
  8. “glab mr” Command Examples
  9. mailstat Command Examples in Linux
  10. flatpak Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright