1.\" Copyright (c) 1983, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" %sccs.include.redist.man% 8.\" 9.\" @(#)chgrp.1 8.1 (Berkeley) 06/29/93 10.\" 11.Dd 12.Dt CHGRP 1 13.Os BSD 4.2 14.Sh NAME 15.Nm chgrp 16.Nd change group 17.Sh SYNOPSIS 18.Nm chgrp 19.Op Fl HRfh 20.Ar group 21.Ar files ... 22.Sh DESCRIPTION 23The chgrp utility sets the group ID of the file named by each 24.Ar file 25operand to the 26.Ar group 27ID specified by the group operand. 28.Pp 29Options: 30.Bl -tag -width Ds 31.It Fl H 32When encountering a symbolic link on the command line, follow it. All other 33symbolic links encountered in the traversal are not followed. 34.It Fl R 35Recursively change file group IDs. 36For each 37.Ar file 38operand that names a directory, chgrp changes the 39group of the directory and all files in the file 40hierarchy below it. 41When symbolic links are encountered, their group is changed, 42but they are not traversed. 43.It Fl f 44The force option ignores errors, except for usage errors and doesn't 45query about strange modes (unless the user does not have proper permissions). 46.It Fl h 47When encountering a symbolic link anywhere in the traversal, follow it. 48.El 49.Pp 50The group of a symbolic link is immutable, so unless the 51.Fl h 52or 53.Fl H 54flag is set, 55.Nm chgrp 56on a symbolic link is a no-op. 57.Pp 58Operands: 59.Bl -tag -width group 60.It Ar group 61The 62.Ar group 63can be either a group name from the group database, or a numeric 64group ID. 65.It Ar file 66A pathname of a file whose group ID is to be modified. 67.El 68.Pp 69The user invoking 70must belong 71to the specified group and be the owner of the file, or be the super-user. 72.Pp 73The 74.Nm chgrp 75utility exits 0 on success, and >0 if an error occurs. 76.Sh FILES 77.Bl -tag -width /etc/group -compact 78.It Pa /etc/group 79Group ID file 80.El 81.Sh SEE ALSO 82.Xr chown 2 , 83.Xr chown 8 , 84.Xr group 5 , 85.Xr passwd 5 , 86.Xr fts 3 , 87.Xr symlink 7 88.Sh STANDARDS 89The 90.Nm chgrp 91utility is expected to be POSIX 1003.2 compatible. 92This manual page is derived from the POSIX 1003.2 manual page. 93