CHGRP(1)
β¨ 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,chgrpwill not follow symbolic links. this is a potential dangerous option, becausechgrpwill not check for cycles. be careful, fr fr π. this option requires the-Roption to be set.-Hβ Follow symbolic links of command line files/directories only. this option requires the-Roption to be set.-Pβ Do not follow symbolic links at all. this option requires the-Roption 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 π
chgrpcan loop forever when symbolic links create cycles. like, forever forever. πchgrpusesFile::Findto 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 β
π COPYRIGHT and LICENSE π
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
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms