The chgrp command is used by unprivileged users on Unix-like systems to change the group associated with a file. Unlike the chown command, chgrp allows regular users to change groups, but only to one of which they are a member. In computing, privilege is defined as the delegation of authority over a system. ... Jump to: navigation, search A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. ... chown is a Unix command used to change the recorded owner of a computer file. ...
The group parameter indicates the new group with which the targets should be associated.
The target parameters indicate the files or directories for which the change should not be made.
Footnote: The group parameter may either be a symbolic name or an identifier. In Unix-like systems, multiple users can be combined to form groups. ...
Usage example
$ls -l ttt -rw-r--r-- 1 gbeeker staff 545 Nov 04 2004 ttt $chgrp system ttt $ls -l ttt -rw-r--r-- 1 gbeeker system 545 Nov 04 2004 ttt
The above command changes the group associated with ttt to 'system', provided the executing user is a member of that group.
External links
[1] The program's manpage Almost all substantial UNIX and Unix-like operating systems have extensive documentation available as an electronic manual, split into multiple sections called man pages (short for manual pages and based on the command used to display them). ...
The chgrp command changes the group associated with the specified file or directory to the specified group name or group ID number.
If you specify the -h flag, the chgrp command has the opposite effect and changes the group ownership of the link itself and not that of the file or directory pointed to by the link.
If you specify both the -h flag and the -R flag, the chgrp command descends the specified directories recursively, and when a symbolic link is encountered, the group ownership of the link itself is changed and not that of the file or directory pointed to by the link.