1*63671Sbostic.\" Copyright (c) 1983, 1990, 1993 2*63671Sbostic.\" 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*63671Sbostic.\" @(#)chgrp.1 8.1 (Berkeley) 06/29/93 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 1953774Selan.Op Fl HRfh 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 3153774Selan.It Fl H 3253774SelanWhen encountering a symbolic link on the command line, follow it. All other 3353774Selansymbolic links encountered in the traversal are not followed. 3447399Scael.It Fl R 3543082ScaelRecursively change file group IDs. 3644952ScaelFor each 3744952Scael.Ar file 3843082Scaeloperand that names a directory, chgrp changes the 3943082Scaelgroup of the directory and all files in the file 4043082Scaelhierarchy below it. 4143082ScaelWhen symbolic links are encountered, their group is changed, 4243082Scaelbut they are not traversed. 4347399Scael.It Fl f 4443082ScaelThe force option ignores errors, except for usage errors and doesn't 4563670Smckusickquery about strange modes (unless the user does not have proper permissions). 4653774Selan.It Fl h 4753774SelanWhen encountering a symbolic link anywhere in the traversal, follow it. 4847399Scael.El 4943082Scael.Pp 5063670SmckusickThe group of a symbolic link is immutable, so unless the 5153774Selan.Fl h 5253774Selanor 5353774Selan.Fl H 5463670Smckusickflag is set, 5553774Selan.Nm chgrp 5653774Selanon a symbolic link is a no-op. 5753774Selan.Pp 5843082ScaelOperands: 5947399Scael.Bl -tag -width group 6047399Scael.It Ar group 6143082ScaelThe 6243082Scael.Ar group 6343082Scaelcan be either a group name from the group database, or a numeric 6443082Scaelgroup ID. 6547399Scael.It Ar file 6643082ScaelA pathname of a file whose group ID is to be modified. 6747399Scael.El 6843082Scael.Pp 6943082ScaelThe user invoking 7019699Smckusickmust belong 7119699Smckusickto the specified group and be the owner of the file, or be the super-user. 7243082Scael.Pp 7343082ScaelThe 7443082Scael.Nm chgrp 7543082Scaelutility exits 0 on success, and >0 if an error occurs. 7643082Scael.Sh FILES 7747399Scael.Bl -tag -width /etc/group -compact 7847399Scael.It Pa /etc/group 7943082ScaelGroup ID file 8047399Scael.El 8143082Scael.Sh SEE ALSO 8243082Scael.Xr chown 2 , 8343082Scael.Xr chown 8 , 8443082Scael.Xr group 5 , 8553774Selan.Xr passwd 5 , 8655737Sbostic.Xr fts 3 , 8755737Sbostic.Xr symlink 7 8843082Scael.Sh STANDARDS 8943082ScaelThe 9043082Scael.Nm chgrp 9163670Smckusickutility is expected to be POSIX 1003.2 compatible. 9244952ScaelThis manual page is derived from the POSIX 1003.2 manual page. 93