File: chgrp.1

package info (click to toggle)
coreutils 9.10-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 70,560 kB
  • sloc: ansic: 253,546; sh: 30,931; perl: 8,141; yacc: 1,846; makefile: 198; python: 47; sed: 16
file content (100 lines) | stat: -rw-r--r-- 4,456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.50.1.
.TH CHGRP "1" "February 2026" "GNU coreutils 9.10" "User Commands"
.SH NAME
chgrp \- change group ownership
.SH SYNOPSIS
.B chgrp
[\fI\,OPTION\/\fR]... \fI\,GROUP FILE\/\fR...
.br
.B chgrp
[\fI\,OPTION\/\fR]... \fI\,--reference=RFILE FILE\/\fR...
.SH DESCRIPTION
.\" Add any additional description here
.PP
Change the group of each FILE to GROUP.
With \fB\-\-reference\fR, change the group of each FILE to that of RFILE.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-c'\fB\-c, \-\-changes\fP\X'tty: link'
like verbose but report only when a change is made
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-f'\fB\-f, \-\-silent, \-\-quiet\fP\X'tty: link'
suppress most error messages
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-v'\fB\-v, \-\-verbose\fP\X'tty: link'
output a diagnostic for every file processed
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp--dereference'\fB\-\-dereference\fP\X'tty: link'
affect the referent of each symbolic link (this is
the default), rather than the symbolic link itself
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-h'\fB\-h, \-\-no\-dereference\fP\X'tty: link'
affect symbolic links instead of any referenced file;
useful only on systems that can change the ownership of a symlink
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp--from'\fB\-\-from=CURRENT_OWNER:CURRENT_GROUP\fP\X'tty: link'
change the ownership of each file only if its
current owner and/or group match those specified here.
Either may be omitted, in which case a match
is not required for the omitted attribute
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp--no-preserve-root'\fB\-\-no\-preserve\-root\fP\X'tty: link'
do not treat '/' specially (the default)
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp--preserve-root'\fB\-\-preserve\-root\fP\X'tty: link'
fail to operate recursively on '/'
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp--reference'\fB\-\-reference=RFILE\fP\X'tty: link'
use RFILE's ownership rather than specifying values.
RFILE is always dereferenced if a symbolic link.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-R'\fB\-R, \-\-recursive\fP\X'tty: link'
operate on files and directories recursively
.PP
The following options modify how a hierarchy is traversed when the \fB\-R\fR
option is also specified.  If more than one is specified, only the final
one takes effect. \fB\-P\fR is the default.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-H'\fB\-H\fP\X'tty: link'
if a command line argument is a symlink to a directory, traverse it
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-L'\fB\-L\fP\X'tty: link'
traverse every symbolic link to a directory encountered
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chgrp-P'\fB\-P\fP\X'tty: link'
do not traverse any symbolic links
.TP
\X'tty: link https://www.gnu.org/software/coreutils/chgrp#chgrp--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/chgrp#chgrp--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.SH EXAMPLES
.TP
chgrp staff /u
Change the group of /u to "staff".
.TP
chgrp \-hR staff /u
Change the group of /u and subfiles to "staff".
.SH AUTHOR
Written by David MacKenzie and Jim Meyering.
.SH "REPORTING BUGS"
Report bugs to: bug\-coreutils@gnu.org
.br
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
.br
General help using GNU software: <https://www.gnu.org/gethelp/>
.br
Report any translation bugs to <https://translationproject.org/team/>
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
\fBchown\fP(1), \fBchown\fP(2)
.PP
.br
Full documentation <https://www.gnu.org/software/coreutils/chgrp>
.br
or available locally via: info \(aq(coreutils) chgrp invocation\(aq