Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/c/chgrp.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/c/chgrp.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/c/chgrp.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/c/chgrp.html on line 8
Change file group ownership (POSIX)
chgrp [-R] [-v] group file...
Neutrino
- -R
- Recursively change group ownership of files. For each file
that names a directory, chgrp changes the group of the
directory and of all files in the file hierarchy below it.
- -v
- Be verbose; display to stdout all the operations being
performed.
- group
- A group name from the group database, or a numeric group ID.
- file
- The pathname of a file whose group ID is to be modified.
The chgrp utility lets you change the group ownership of one or
more files. For each file you name, chgrp sets the file's group
ID to that specified by the group argument.
If you invoke chgrp with the -R option,
and chgrp attempts but fails to change the group ID
of a particular file in a specified file hierarchy, it continues to
process the remaining files in the hierarchy.
|
You must be root or the owner of the file in order to change
its group ownership.
The underlying filesystem might impose further restrictions.
For example, the QNX 4 filesystem sets the
_PC_CHOWN_RESTRICTED configuration variable;
for more information, see
pathconf()
in the Neutrino Library Reference. |
Change the group of myfile to 27:
chgrp 27 myfile
Change the group of myfile to technical:
chgrp technical myfile
- /etc/group
- This file defines the known group IDs for the system. It associates
group names with a numerical ID and a list of
users who are members of the group.
Entries in this file appear in the following format:
groupname:unused:groupid:user[,user]...
- 0
- The utility executed successfully and all requested changes were made.
- >0
- An error occurred.
chmod,
chown,
find ... -chgrp
Working with Files
in the Neutrino User's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/c/chgrp.html on line 169
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/c/chgrp.html on line 169