CHGRP(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ’– CHGRP(1) πŸ’–

okay bestie, welcome to the chgrp manual page, part of the GNU coreutils bag πŸŽ€ it lives in section 1 (User Commands) and honestly? it's a whole vibe. let's get into it.


✨ NAME ✨

chgrp β€” change group ownership πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So what are we doing here? We're changing the group of each FILE to GROUP. πŸ’« And if you roll with --reference, you change the group of each FILE to the group of RFILE instead. icon status tbh.

here's every single option, no skips, no shortcuts, we're doing the full tour:

  • -c, --changes β€” it's giving verbose, but the glow-up is that it only reports when an actual change is made ✨
  • -f, --silent, --quiet β€” suppresses most error messages. shhh. not the drama today πŸ™ˆ
  • -v, --verbose β€” outputs a diagnostic for every file processed. every. single. one. she's chatty and we love her πŸ’¬
  • --dereference β€” affects the referent of each symbolic link rather than the symbolic link itself. and bestie, this is the default πŸ‘‘
  • -h, --no-dereference β€” affects symbolic links instead of any referenced file. heads up tho: this is only useful on systems that can change the ownership of a symlink 🫢
  • --from=CURRENT_OWNER:CURRENT_GROUP β€” only changes the ownership of each file if its current owner and/or group match what you specify here. either one may be omitted, and if it's omitted then a match isn't required for the omitted attribute. conditioned slay πŸ’…
  • --no-preserve-root β€” does not treat / specially. and yes, that's the default. no cap 😭
  • --preserve-root β€” fails to operate recursively on /. protective queen behavior πŸ›‘οΈ
  • --reference=RFILE β€” uses RFILE's ownership instead of you specifying values. and RFILE is always dereferenced if it's a symbolic link, no exceptions πŸ‘€
  • -R, --recursive β€” operates on files and directories recursively. we're going deep πŸŒ€

the next lil squad? these modify how a hierarchy is traversed when the -R option is also specified. and real talk: if more than one of them is specified, only the final one takes effect. also -P is the default. noted. periodt.

  • -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 🚫

and finally, the two classics:

  • --help β€” display this help and exit πŸ†˜
  • --version β€” output version information and exit 🏷️

🌈 EXAMPLES 🌈

okay show-and-tell time, these are the receipts:

chgrp staff /u

Change the group of /u to "staff". πŸ’–

chgrp -hR staff /u

Change the group of /u and subfiles to "staff". πŸ’– recursive AND symlink-aware, she contains multitudes.


πŸ‘‘ AUTHOR πŸ‘‘

Written by David MacKenzie and Jim Meyering. absolute legends, we stan 🫢


πŸ› REPORTING BUGS πŸ›

found a bug? tell the devs, don't be shy:


πŸ’œ SEE ALSO πŸ’œ

Full documentation <https://www.gnu.org/software/coreutils/chgrp> or available locally via: info '(coreutils) chgrp invocation' πŸ“–


Packaged by Ubuntu (9.10-1ubuntu2) β€” that's the packaging note, keep it in mind if you're filing stuff πŸ’…
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. ⚠️ (fr fr, no warranty, read the license)

and that's the whole page bestie πŸŽ€ this doc is from GNU coreutils 9.10, dated August 2026 β€” so if you're reading this in the future, hi, slay, go change some groups πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from