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