1*66539Sbostic.\" Copyright (c) 1983, 1990, 1993, 1994 263671Sbostic.\" The Regents of the University of California. All rights reserved. 319699Smckusick.\" 450180Sbostic.\" This code is derived from software contributed to Berkeley by 550180Sbostic.\" the Institute of Electrical and Electronics Engineers, Inc. 650180Sbostic.\" 743082Scael.\" %sccs.include.redist.man% 819699Smckusick.\" 9*66539Sbostic.\" @(#)chgrp.1 8.2 (Berkeley) 03/31/94 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 19*66539Sbostic.Oo 20*66539Sbostic.Fl R 21*66539Sbostic.Op Fl H | Fl L | Fl P 22*66539Sbostic.Oc 23*66539Sbostic.Op Fl f 2443082Scael.Ar group 2543082Scael.Ar files ... 2643082Scael.Sh DESCRIPTION 2743082ScaelThe chgrp utility sets the group ID of the file named by each 2843082Scael.Ar file 2943082Scaeloperand to the 3043082Scael.Ar group 3143082ScaelID specified by the group operand. 3243082Scael.Pp 3343082ScaelOptions: 3447399Scael.Bl -tag -width Ds 3553774Selan.It Fl H 36*66539SbosticIf the 37*66539Sbostic.Fl R 38*66539Sbosticoption is specified, symbolic links on the command line are followed. 39*66539Sbostic(Symbolic links encountered in the tree traversal are not followed.) 40*66539Sbostic.It Fl L 41*66539SbosticIf the 42*66539Sbostic.Fl R 43*66539Sbosticoption is specified, all symbolic links are followed. 44*66539Sbostic.It Fl P 45*66539SbosticIf the 46*66539Sbostic.Fl R 47*66539Sbosticoption is specified, no symbolic links are followed. 4847399Scael.It Fl R 49*66539SbosticChange the group ID for the file hierarchies rooted 50*66539Sbosticin the files instead of just the files themselves. 5147399Scael.It Fl f 5243082ScaelThe force option ignores errors, except for usage errors and doesn't 5363670Smckusickquery about strange modes (unless the user does not have proper permissions). 5447399Scael.El 5543082Scael.Pp 56*66539SbosticSymbolic links don't have groups, so unless the 57*66539Sbostic.Fl H 5853774Selanor 59*66539Sbostic.Fl L 60*66539Sbosticoption is set, 6153774Selan.Nm chgrp 6253774Selanon a symbolic link is a no-op. 63*66539SbosticThe 64*66539Sbostic.Fl H , 65*66539Sbostic.Fl L 66*66539Sbosticand 67*66539Sbostic.Fl P 68*66539Sbosticoptions are ignored unless the 69*66539Sbostic.Fl R 70*66539Sbosticoption is specified. 71*66539SbosticIn addition, these options override each other and the 72*66539Sbosticcommand's actions are determined by the last one specified. 7353774Selan.Pp 7443082ScaelThe 7543082Scael.Ar group 76*66539Sbosticoperand can be either a group name from the group database, 77*66539Sbosticor a numeric group ID. 78*66539SbosticIf a group name is also a numeric group ID, the operand is used as a 79*66539Sbosticgroup name. 8043082Scael.Pp 8143082ScaelThe user invoking 82*66539Sbostic.Nm chgrp 83*66539Sbosticmust belong to the specified group and be the owner of the file, 84*66539Sbosticor be the super-user. 8543082Scael.Pp 8643082ScaelThe 8743082Scael.Nm chgrp 8843082Scaelutility exits 0 on success, and >0 if an error occurs. 89*66539Sbostic.Sh COMPATIBILITY 90*66539SbosticPrevious versions of the 91*66539Sbostic.Nm chgrp 92*66539Sbosticutility changed the group of symbolic links specified on the command 93*66539Sbosticline. 94*66539SbosticIn this system, symbolic links do not have groups. 9543082Scael.Sh FILES 9647399Scael.Bl -tag -width /etc/group -compact 9747399Scael.It Pa /etc/group 9843082ScaelGroup ID file 9947399Scael.El 10043082Scael.Sh SEE ALSO 10143082Scael.Xr chown 2 , 10243082Scael.Xr group 5 , 10353774Selan.Xr passwd 5 , 10455737Sbostic.Xr fts 3 , 105*66539Sbostic.Xr symlink 7 , 106*66539Sbostic.Xr chown 8 10743082Scael.Sh STANDARDS 10843082ScaelThe 10943082Scael.Nm chgrp 11063670Smckusickutility is expected to be POSIX 1003.2 compatible. 111