xref: /csrg-svn/usr.sbin/chown/chgrp.1 (revision 47399)
143082Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
243082Scael.\" All rights reserved.
319699Smckusick.\"
443082Scael.\" %sccs.include.redist.man%
519699Smckusick.\"
6*47399Scael.\"     @(#)chgrp.1	6.6 (Berkeley) 03/14/91
743082Scael.\"
843082Scael.Dd
943082Scael.Dt CHGRP 1
1043082Scael.Os BSD 4.2
1143082Scael.Sh NAME
1243082Scael.Nm chgrp
1343082Scael.Nd change group
1443082Scael.Sh SYNOPSIS
1543082Scael.Nm chgrp
1643082Scael.Op Fl Rf
1743082Scael.Ar group
1843082Scael.Ar files ...
1943082Scael.Sh DESCRIPTION
2043082ScaelThe chgrp utility sets the group ID of the file named by each
2143082Scael.Ar file
2243082Scaeloperand to the
2343082Scael.Ar group
2443082ScaelID specified by the group operand.
2543082Scael.Pp
2643082ScaelOptions:
27*47399Scael.Bl -tag -width Ds
28*47399Scael.It Fl R
2943082ScaelRecursively change file group IDs.
3044952ScaelFor each
3144952Scael.Ar file
3243082Scaeloperand that names a directory, chgrp changes the
3343082Scaelgroup of the directory and all files in the file
3443082Scaelhierarchy below it.
3543082ScaelWhen symbolic links are encountered, their group is changed,
3643082Scaelbut they are not traversed.
37*47399Scael.It Fl f
3843082ScaelThe force option ignores errors, except for usage errors and doesn't
3943082Scaelquery about strange modes (unless user does not have proper permissions).
40*47399Scael.El
4143082Scael.Pp
4243082ScaelOperands:
43*47399Scael.Bl -tag -width group
44*47399Scael.It Ar group
4543082ScaelThe
4643082Scael.Ar group
4743082Scaelcan be either a group name from the group database, or a numeric
4843082Scaelgroup ID.
49*47399Scael.It Ar file
5043082ScaelA pathname of a file whose group ID is to be modified.
51*47399Scael.El
5243082Scael.Pp
5343082ScaelThe user invoking
5419699Smckusickmust belong
5519699Smckusickto the specified group and be the owner of the file, or be the super-user.
5643082Scael.Pp
5743082ScaelThe
5843082Scael.Nm chgrp
5943082Scaelutility exits 0 on success, and >0 if an error occurs.
6043082Scael.Sh FILES
61*47399Scael.Bl -tag -width /etc/group -compact
62*47399Scael.It Pa /etc/group
6343082ScaelGroup ID file
64*47399Scael.El
6543082Scael.Sh SEE ALSO
6643082Scael.Xr chown 2 ,
6743082Scael.Xr chown 8 ,
6843082Scael.Xr group 5 ,
6943082Scael.Xr passwd 5
7043082Scael.Sh STANDARDS
7143082ScaelThe
7243082Scael.Nm chgrp
7343082Scaelfunction is expected to be POSIX 1003.2 compatible.
7444952ScaelThis manual page is derived from the POSIX 1003.2 manual page.
75