The (from change group)
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
...
may be used by
unprivileged users on various
operating systems to change the
group associated with a
file system
In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one lar ...
object (such as a
computer file
A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and trans ...
,
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.
History
The command was originally developed as part of the
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
operating system by
AT&T Bell Laboratories
Nokia Bell Labs, originally named Bell Telephone Laboratories (1925–1984),
then AT&T Bell Laboratories (1984–1996)
and Bell Labs Innovations (1996–2007),
is an American industrial Research and development, research and scientific developm ...
.
It is also available in the
Plan 9 Plan 9 or Plan Nine may refer to:
Music
* Plan 9 (band), a psychedelic rock band from Rhode Island
* ''Plan 9'', an album by Big Guitars From Memphis with Rick Lindy
* "Plan 9", a song on the 1993 album ''Gorgeous'' by electronica band 808 Stat ...
and
Inferno operating systems and in most
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
systems.
The command has also been ported to the
IBM i operating system.
Syntax
chgrp
'options''''group'' ''FSO''
* The ''group'' parameter specifies the new group with which the files or directories should be associated. It may either be a symbolic name or an
identifier
An identifier is a name that identifies (that is, labels the identity of) either a unique object or a unique ''class'' of objects, where the "object" or class may be an idea, physical countable object (or class thereof), or physical noncountable ...
.
* The ''FSO'' specifies one or more file system objects, which may be the result of a
glob expression like .
Frequently implemented options
recurse through subdirectories.
verbosely output names of objects changed. Most useful when is a list.
force or forge ahead with other objects even if an error is encountered.
Example
$ 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 to (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 and .
See also
*
chmod
In Unix and Unix-like operating systems, is the command and system call used to change the access permissions and the special mode flags (the ''setuid'', ''setgid'', and ''sticky'' flags) of file system objects ( files and directories). Coll ...
*
chown
The command , an abbreviation of ''change owner'', is used on Unix and Unix-like operating systems to change the owner of file system files, directories
Directory may refer to:
* Directory (computing), or folder, a file system structure in ...
*
Group identifier (Unix)
*
List of Unix commands
This is a list of Unix commands as specified by IEEE Std 1003.1-2008, which is part of the Single UNIX Specification (SUS). These commands can be found on Unix operating systems and most Unix-like operating systems.
List
See also
* List of G ...
*
id (Unix)
References
External links
*
*
*
{{Core Utilities commands
Operating system security
Standard Unix programs
Unix SUS2008 utilities
Plan 9 commands
Inferno (operating system) commands
IBM i Qshell commands
de:Unix-Kommandos#Benutzer- und Rechteverwaltung