xref: /csrg-svn/usr.sbin/chown/chgrp.1 (revision 50180)
143082Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California.
243082Scael.\" All rights reserved.
319699Smckusick.\"
4*50180Sbostic.\" This code is derived from software contributed to Berkeley by
5*50180Sbostic.\" the Institute of Electrical and Electronics Engineers, Inc.
6*50180Sbostic.\"
743082Scael.\" %sccs.include.redist.man%
819699Smckusick.\"
9*50180Sbostic.\"     @(#)chgrp.1	6.7 (Berkeley) 06/27/91
1043082Scael.\"
1143082Scael.Dd
1243082Scael.Dt CHGRP 1
1343082Scael.Os BSD 4.2
1443082Scael.Sh NAME
1543082Scael.Nm chgrp
1643082Scael.Nd change group
1743082Scael.Sh SYNOPSIS
1843082Scael.Nm chgrp
1943082Scael.Op Fl Rf
2043082Scael.Ar group
2143082Scael.Ar files ...
2243082Scael.Sh DESCRIPTION
2343082ScaelThe chgrp utility sets the group ID of the file named by each
2443082Scael.Ar file
2543082Scaeloperand to the
2643082Scael.Ar group
2743082ScaelID specified by the group operand.
2843082Scael.Pp
2943082ScaelOptions:
3047399Scael.Bl -tag -width Ds
3147399Scael.It Fl R
3243082ScaelRecursively change file group IDs.
3344952ScaelFor each
3444952Scael.Ar file
3543082Scaeloperand that names a directory, chgrp changes the
3643082Scaelgroup of the directory and all files in the file
3743082Scaelhierarchy below it.
3843082ScaelWhen symbolic links are encountered, their group is changed,
3943082Scaelbut they are not traversed.
4047399Scael.It Fl f
4143082ScaelThe force option ignores errors, except for usage errors and doesn't
4243082Scaelquery about strange modes (unless user does not have proper permissions).
4347399Scael.El
4443082Scael.Pp
4543082ScaelOperands:
4647399Scael.Bl -tag -width group
4747399Scael.It Ar group
4843082ScaelThe
4943082Scael.Ar group
5043082Scaelcan be either a group name from the group database, or a numeric
5143082Scaelgroup ID.
5247399Scael.It Ar file
5343082ScaelA pathname of a file whose group ID is to be modified.
5447399Scael.El
5543082Scael.Pp
5643082ScaelThe user invoking
5719699Smckusickmust belong
5819699Smckusickto the specified group and be the owner of the file, or be the super-user.
5943082Scael.Pp
6043082ScaelThe
6143082Scael.Nm chgrp
6243082Scaelutility exits 0 on success, and >0 if an error occurs.
6343082Scael.Sh FILES
6447399Scael.Bl -tag -width /etc/group -compact
6547399Scael.It Pa /etc/group
6643082ScaelGroup ID file
6747399Scael.El
6843082Scael.Sh SEE ALSO
6943082Scael.Xr chown 2 ,
7043082Scael.Xr chown 8 ,
7143082Scael.Xr group 5 ,
7243082Scael.Xr passwd 5
7343082Scael.Sh STANDARDS
7443082ScaelThe
7543082Scael.Nm chgrp
7643082Scaelfunction is expected to be POSIX 1003.2 compatible.
7744952ScaelThis manual page is derived from the POSIX 1003.2 manual page.
78