chgrp
Sign in to save', short for change group', is a shell command for changing the group associated with a Unix-based file system file including special files such as directories. Changing the group of a file is restricted to a super-user (such as via ) or to the file's owning user if the user is in the specified group.
Key facts
- Software.name
- chgrp
- Software.screenshot
- Chgrp-example-command.gif
- Software.caption
- Example usage of command to change the files' groups
- Software.developer
- AT&T Bell Laboratories
- Software.programming language
- Plan 9: C
- Software.operating system
- Unix, Unix-like, Plan 9, Inferno, IBM i
- Software.platform
- Cross-platform
- Software.genre
- Command
- Software.license
- Plan 9: MIT License
via Wikipedia infobox
Described at
chgrp
pubs.opengroup.org →The chgrp utility shall set the group ID of the file named by each file operand to the group ID specified by the group operand. For each file operand, or, if the -R option is used, each file encountered while walking the directory trees specified by the file operands, the chgrp utility shall perform actions equivalent to the chown () function defined in the System Interfaces volume of POSIX.1-2017, called with the following arguments: Unless chgrp is invoked by a process with appropriate privileges, the set-user-ID and set-group-ID bits of a regular file shall be cleared upon successful completion; the set-user-ID and set-group-ID bits of other file types may be cleared. For each file operand that names a file of type symbolic link, chgrp shall attempt to set the group ID of the symbolic link instead of the file referenced by the symbolic link. If the -R option is specified and a symbolic link is specified on the command line or encountered during the traversal of a file hierarchy, chgrp shall change the group ID of the symbolic link. The chgrp utility shall not follow the symbolic link to any other part of the file hierarchy. Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( Some implementations restrict the use of chgrp to a user with appropriate privileges when the group specified is not the effective group ID or one of the supplementary group IDs of the calling process. The System V and BSD versions use different exit status codes. Some implementations used the exit status as a count of the number of errors that occurred; this practice is unworkable since it can overflow the range of valid exit status values. The standard developers chose to mask these by specifying only 0 and 0 as exit values. IEEE PASC Interpretation 1003.2 172 is applied, changing the CONSEQUENCES OF ERRORS section to "Default.". SD5-XCU-ERN-8 is applied, removing the -R from the first line of the SYNOPSIS.
Excerpt from a page describing this subject · 9,186 chars · not written by Vinony
Wikidata facts
- Part of
- GNU Core Utilities
Show 2 more facts
- described at URL
- pubs.opengroup.org/onlinepubs/9699919799/utilities/chgrp.html
- has command line option
- R
Sources (2)
via Wikidata · CC0
Article · Español
El comando chgrp permite cambiar el grupo de usuarios de un archivo o directorio en sistemas tipo UNIX.Cada archivo de Unix tiene un identificador de usuario (UID) y un identificador de grupo (GID), que se corresponden con el usuario y el grupo de quien lo creó. El usuario root puede cambiar a cualquier archivo el grupo. Los demás usuarios solo pueden hacerlo con los archivos propios y grupos a los que pertenezca. Sintaxis: $ chgrp nuevogrp archivo1 [ archivo2 archivo3...] Cambia el grupo de archivo1 archivo2, etc. que pasará a ser nuevogrp $ chgrp -R nuevogrp directorio Cambia el grupo para que pase a ser nuevogrp a directorio, todos los archivos y subdirectorios contenidos en él, cambiándolos también de forma recursiva en todos archivos de los subdirectorios.
Abstract from DBpedia / Wikipedia · CC BY-SA