xref: /original-bsd/usr.sbin/chown/chgrp.1 (revision 2ca53284)
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.5 (Berkeley) 07/24/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.Tw Ds
28.Tp 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.Tp 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.Tp
41.Pp
42Operands:
43.Tw Ds
44.Tp Ar group
45The
46.Ar group
47can be either a group name from the group database, or a numeric
48group ID.
49.Tp Ar file
50A pathname of a file whose group ID is to be modified.
51.Tp
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.Dw /etc/group
62.Di L
63.Dp Pa /etc/group
64Group ID file
65.Dp
66.Sh SEE ALSO
67.Xr chown 2 ,
68.Xr chown 8 ,
69.Xr group 5 ,
70.Xr passwd 5
71.Sh STANDARDS
72The
73.Nm chgrp
74function is expected to be POSIX 1003.2 compatible.
75This manual page is derived from the POSIX 1003.2 manual page.
76