166539Sbostic.\" 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*66546Sbostic.\" @(#)chgrp.1 8.3 (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 1966539Sbostic.Oo 2066539Sbostic.Fl R 2166539Sbostic.Op Fl H | Fl L | Fl P 2266539Sbostic.Oc 2366539Sbostic.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 3666539SbosticIf the 3766539Sbostic.Fl R 3866539Sbosticoption is specified, symbolic links on the command line are followed. 3966539Sbostic(Symbolic links encountered in the tree traversal are not followed.) 4066539Sbostic.It Fl L 4166539SbosticIf the 4266539Sbostic.Fl R 4366539Sbosticoption is specified, all symbolic links are followed. 4466539Sbostic.It Fl P 4566539SbosticIf the 4666539Sbostic.Fl R 4766539Sbosticoption is specified, no symbolic links are followed. 4847399Scael.It Fl R 4966539SbosticChange the group ID for the file hierarchies rooted 5066539Sbosticin 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 5666539SbosticSymbolic links don't have groups, so unless the 5766539Sbostic.Fl H 5853774Selanor 5966539Sbostic.Fl L 6066539Sbosticoption is set, 6153774Selan.Nm chgrp 62*66546Sbosticon a symbolic link always succeeds and has no effect. 6366539SbosticThe 6466539Sbostic.Fl H , 6566539Sbostic.Fl L 6666539Sbosticand 6766539Sbostic.Fl P 6866539Sbosticoptions are ignored unless the 6966539Sbostic.Fl R 7066539Sbosticoption is specified. 7166539SbosticIn addition, these options override each other and the 7266539Sbosticcommand's actions are determined by the last one specified. 7353774Selan.Pp 7443082ScaelThe 7543082Scael.Ar group 7666539Sbosticoperand can be either a group name from the group database, 7766539Sbosticor a numeric group ID. 7866539SbosticIf a group name is also a numeric group ID, the operand is used as a 7966539Sbosticgroup name. 8043082Scael.Pp 8143082ScaelThe user invoking 8266539Sbostic.Nm chgrp 8366539Sbosticmust belong to the specified group and be the owner of the file, 8466539Sbosticor be the super-user. 8543082Scael.Pp 8643082ScaelThe 8743082Scael.Nm chgrp 8843082Scaelutility exits 0 on success, and >0 if an error occurs. 8966539Sbostic.Sh COMPATIBILITY 9066539SbosticPrevious versions of the 9166539Sbostic.Nm chgrp 9266539Sbosticutility changed the group of symbolic links specified on the command 9366539Sbosticline. 9466539SbosticIn 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 , 10566539Sbostic.Xr symlink 7 , 10666539Sbostic.Xr chown 8 10743082Scael.Sh STANDARDS 10843082ScaelThe 10943082Scael.Nm chgrp 11063670Smckusickutility is expected to be POSIX 1003.2 compatible. 111