Developer(s) | AT&T Bell Laboratories |
---|---|
Initial release | May 1975; 49 years ago (1975-05) |
Written in | Plan 9: C |
Operating system | Unix, Unix-like, Plan 9, Inferno, IBM i |
Platform | Cross-platform |
Type | Command |
License | Plan 9: MIT License |
The chgrp (from change group) command may be used by unprivileged users on various operating systems to change the group associated with a file system object (such as a computer file, directory, or link) to one of which they are a member. A file system object has 3 sets of access permissions, one set for the owner, one set for the group and one set for others. Changing the group of an object could be used to change which users can write to a file.
The chgrp command was originally developed as part of the Unix operating system by AT&T Bell Laboratories.
It is also available in the Plan 9 and Inferno operating systems and in most Unix-like systems.
The chgrp command has also been ported to the IBM i operating system.[1]
chgrp [options] group FSO
-R recurse through subdirectories.
-v verbosely output names of objects changed. Most useful when "FSO" is a list.
-f force or forge ahead with other objects even if an error is encountered.
$ ls -l *.conf
-rw-rw-r-- 1 gbeeker wheel 3545 Nov 04 2011 prog.conf
-rw-rw-r-- 1 gbeeker wheel 3545 Nov 04 2011 prox.conf
$ chgrp staff *.conf
$ ls -l *.conf
-rw-rw-r-- 1 gbeeker staff 3545 Nov 04 2011 prog.conf
-rw-rw-r-- 1 gbeeker staff 3545 Nov 04 2011 prox.conf
The above command changes the group associated with file prog.conf from wheeltostaff (provided the executing user is a member of that group). This could be used to allow members of staff to modify the configuration for programs prog and prox.
chgrp
: change the file group ownership – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Groupchgrp(1)
– Plan 9 Programmer's Manual, Volume 1chgrp(1)
– Inferno General commands Manual
| |
---|---|
File system |
|
Processes |
|
User environment |
|
Text processing |
|
Shell builtins |
|
Searching |
|
Documentation |
|
Software development |
|
Miscellaneous |
|
|
| |
---|---|
File system |
|
Processes |
|
User environment |
|
Text processing |
|
Shell builtins |
|
Networking |
|
Searching |
|
Software development |
|
Miscellaneous |
|
|
GNU Core Utilities command-line interface programs
| |
---|---|
File system |
|
Text utilities |
|
Shell utilities |
|