xref: /original-bsd/usr.sbin/chown/chgrp.1 (revision 8fbb78b3)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the Institute of Electrical and Electronics Engineers, Inc.
6.\"
7.\" %sccs.include.redist.man%
8.\"
9.\"     @(#)chgrp.1	6.7 (Berkeley) 06/27/91
10.\"
11.Dd
12.Dt CHGRP 1
13.Os BSD 4.2
14.Sh NAME
15.Nm chgrp
16.Nd change group
17.Sh SYNOPSIS
18.Nm chgrp
19.Op Fl Rf
20.Ar group
21.Ar files ...
22.Sh DESCRIPTION
23The chgrp utility sets the group ID of the file named by each
24.Ar file
25operand to the
26.Ar group
27ID specified by the group operand.
28.Pp
29Options:
30.Bl -tag -width Ds
31.It Fl R
32Recursively change file group IDs.
33For each
34.Ar file
35operand that names a directory, chgrp changes the
36group of the directory and all files in the file
37hierarchy below it.
38When symbolic links are encountered, their group is changed,
39but they are not traversed.
40.It Fl f
41The force option ignores errors, except for usage errors and doesn't
42query about strange modes (unless user does not have proper permissions).
43.El
44.Pp
45Operands:
46.Bl -tag -width group
47.It Ar group
48The
49.Ar group
50can be either a group name from the group database, or a numeric
51group ID.
52.It Ar file
53A pathname of a file whose group ID is to be modified.
54.El
55.Pp
56The user invoking
57must belong
58to the specified group and be the owner of the file, or be the super-user.
59.Pp
60The
61.Nm chgrp
62utility exits 0 on success, and >0 if an error occurs.
63.Sh FILES
64.Bl -tag -width /etc/group -compact
65.It Pa /etc/group
66Group ID file
67.El
68.Sh SEE ALSO
69.Xr chown 2 ,
70.Xr chown 8 ,
71.Xr group 5 ,
72.Xr passwd 5
73.Sh STANDARDS
74The
75.Nm chgrp
76function is expected to be POSIX 1003.2 compatible.
77This manual page is derived from the POSIX 1003.2 manual page.
78