CHGRP(1)

πŸ’– chgrp(1) β€” change group ownership πŸ’–

okay bestie, welcome to the User Commands section of the manual, page 1, and today's main character is chgrp πŸŽ€ she changes group ownership and she does it flawlessly. no cap.


✨ NAME ✨

chgrp β€” change group ownership 🫢


🌸 SYNOPSIS 🌸

chgrp [OPTION]... GROUP FILE...
chgrp [OPTION]... --reference=RFILE FILE...

πŸ‘‘ DESCRIPTION πŸ‘‘

the whole vibe: change the group of each FILE to GROUP πŸ’…. and with --reference, you change the group of each FILE to that of RFILE instead. iconic behaviour honestly.

here come the options, and yes we're doing all of them, no skips, periodt:

  • -c, --changes β€” like --verbose but she only speaks up when a change actually happens. lowkey the polite one πŸŽ€
  • -f, --silent, --quiet β€” suppress most error messages. she's not gonna yell at you πŸ’€
  • -v, --verbose β€” output a diagnostic for every single file processed. main character energy, she narrates everything πŸ”₯
  • --dereference β€” affect the referent of each symbolic link rather than the symbolic link itself. fun fact bestie: this is the default ✨
  • -h, --no-dereference β€” affect symbolic links instead of any referenced file; useful only on systems that can change the ownership of a symlink πŸ¦‹
  • --from=CURRENT_OWNER:CURRENT_GROUP β€” change the ownership of each file only if its current owner and/or group match what you put here. either one may be omitted, in which case a match is not required for the omitted attribute 🧚
  • --no-preserve-root β€” do not treat / specially (the default). it's giving unbothered.
  • --preserve-root β€” fail to operate recursively on /. she said NOT the root directory πŸ™ˆ
  • --reference=RFILE β€” use RFILE's ownership rather than specifying values. RFILE is always dereferenced if a symbolic link. periodt.
  • -R, --recursive β€” operate on files and directories recursively 🌈
πŸ’œ heads up bestie: the next little crew of options only matter for how a hierarchy gets traversed when -R is also specified. if more than one is specified, only the final one takes effect. and -P is the default. iykyk.
  • -H β€” if a command line argument is a symlink to a directory, traverse it
  • -L β€” traverse every symbolic link to a directory encountered
  • -P β€” do not traverse any symbolic links
  • --help β€” display this help and exit πŸ’–
  • --version β€” output version information and exit

🌟 EXAMPLES 🌟

chgrp staff /u      Change the group of /u to "staff".
chgrp -hR staff /u  Change the group of /u and subfiles to "staff".

πŸŽ€ AUTHOR πŸŽ€

Written by David MacKenzie and Jim Meyering. absolute legends, we stan πŸ‘‘


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not the vibe, but tell someone:


Copyright Β© 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. like fr fr, no warranty, that's not a drill 😭


πŸ¦‹ SEE ALSO πŸ¦‹

Full documentation https://www.gnu.org/software/coreutils/chgrp or available locally via: info '(coreutils) chgrp invocation'


and that's the whole page bestie!! πŸ₯³ this was GNU coreutils 9.12, dated September 2026 β€” mwah, go change some groups responsibly πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from