CHGRP(1)

πŸ“¦ version 1.053, in alpine 3.24

✨ CHGRP(1) β€” the perl-flavored one, bestie ✨

okay so before we even start: this is chgrp from the User Contributed Perl Documentation fam β€” not the coreutils one, the Perl one πŸ’… she's a whole different girl and we love her for it.


🌸 NAME 🌸

chgrp β€” change group ownership of files. that's it. that's the vibe. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

chgrp [-R [-H | -L | -P]] group file [files ...]

πŸ’– DESCRIPTION πŸ’–

chgrp sets the group ownership of files. simple as that, no cap. the first argument after the options is the new group β€” so like, group first, then the files, mkay? 🫢

πŸŽ€ OPTIONS πŸŽ€

chgrp accepts the options described below. and listen β€” -L, -H and -P are mutually exclusive, and only the last given option will be honoured. so don't come at her with all three thinking you're clever πŸ™ˆ. also, all of -L, -H and -P require the -R option to be set first. order matters, bestie.

  • -R β€” Recurse into directories. any directories are recursively traversed, and all files and directories will change owner. she goes deep. πŸ”₯
  • -L β€” Follow symbolic links. by default, chgrp will not follow symbolic links. this is a potential dangerous option, because chgrp will not check for cycles. be careful, fr fr 😭. this option requires the -R option to be set.
  • -H β€” Follow symbolic links of command line files/directories only. this option requires the -R option to be set.
  • -P β€” Do not follow symbolic links at all. this option requires the -R option to be set.
⚠️ lowkey a warning: -L does not do cycle detection. she will simply keep going. that's not a flex, that's a bug (see below πŸ’€).

🌈 ENVIRONMENT 🌈

the working of chgrp is not influenced by any environment variables. zero. none. she's unbothered, she's moisturized, she's in her lane. πŸ’…


πŸ’€ BUGS πŸ’€

  • chgrp can loop forever when symbolic links create cycles. like, forever forever. 😭
  • chgrp uses File::Find to recurse. that's the lore.

🧚 REVISION HISTORY 🧚

the receipts, preserved character for character:

$Log: chgrp,v $
Revision 1.2  2004/08/05 14:17:43  cwest
cleanup, new version number on website

Revision 1.1  2004/07/23 20:10:01  cwest
initial import

Revision 1.1  1999/03/02 22:34:29  abigail
Initial revision

πŸ‘‘ AUTHOR πŸ‘‘

The Perl implementation of chgrp was written by Abigail, perlpowertools@abigail.be. icon behavior honestly ⭐


This program is copyright by Abigail 1999.

This program is free and open software. You may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to the same. share the love, don't gatekeep 🫢✨


aaaaand that's the whole page, bestie πŸ’œ this lil copy is perl v5.42.2, dated 2026-02-15 β€” go forth and change some group ownership responsibly, mwah πŸŽ€

πŸ“¦ where this page comes from