xref: /original-bsd/usr.sbin/chown/chgrp.1 (revision 237fdba6)
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.4 (Berkeley) 06/11/90
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.Tp Fl R
28Recursively change file group IDs.
29For each file
30operand that names a directory, chgrp changes the
31group of the directory and all files in the file
32hierarchy below it.
33When symbolic links are encountered, their group is changed,
34but they are not traversed.
35.Tp Fl f
36The force option ignores errors, except for usage errors and doesn't
37query about strange modes (unless user does not have proper permissions).
38.Tp
39.Pp
40Operands:
41.Tp Ar group
42The
43.Ar group
44can be either a group name from the group database, or a numeric
45group ID.
46.Tp Ar file
47A pathname of a file whose group ID is to be modified.
48.Tp
49.Pp
50The user invoking
51must belong
52to the specified group and be the owner of the file, or be the super-user.
53.Pp
54The
55.Nm chgrp
56utility exits 0 on success, and >0 if an error occurs.
57.Sh FILES
58.Dw group
59.Ds L
60.Dp Pa group
61Group ID file
62.Sh SEE ALSO
63.Xr chown 2 ,
64.Xr chown 8 ,
65.Xr group 5 ,
66.Xr passwd 5
67.Sh STANDARDS
68The
69.Nm chgrp
70function is expected to be POSIX 1003.2 compatible.
71