xref: /csrg-svn/usr.sbin/chown/chgrp.1 (revision 44952)
143082Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
243082Scael.\" All rights reserved.
319699Smckusick.\"
443082Scael.\" %sccs.include.redist.man%
519699Smckusick.\"
6*44952Scael.\"     @(#)chgrp.1	6.5 (Berkeley) 07/24/90
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*44952Scael.Tw Ds
2843082Scael.Tp Fl R
2943082ScaelRecursively change file group IDs.
30*44952ScaelFor each
31*44952Scael.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.
3743082Scael.Tp 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).
4043082Scael.Tp
4143082Scael.Pp
4243082ScaelOperands:
43*44952Scael.Tw Ds
4443082Scael.Tp Ar group
4543082ScaelThe
4643082Scael.Ar group
4743082Scaelcan be either a group name from the group database, or a numeric
4843082Scaelgroup ID.
4943082Scael.Tp Ar file
5043082ScaelA pathname of a file whose group ID is to be modified.
5143082Scael.Tp
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*44952Scael.Dw /etc/group
62*44952Scael.Di L
63*44952Scael.Dp Pa /etc/group
6443082ScaelGroup ID file
65*44952Scael.Dp
6643082Scael.Sh SEE ALSO
6743082Scael.Xr chown 2 ,
6843082Scael.Xr chown 8 ,
6943082Scael.Xr group 5 ,
7043082Scael.Xr passwd 5
7143082Scael.Sh STANDARDS
7243082ScaelThe
7343082Scael.Nm chgrp
7443082Scaelfunction is expected to be POSIX 1003.2 compatible.
75*44952ScaelThis manual page is derived from the POSIX 1003.2 manual page.
76