Name
chgrp - change group ownership of files
Synopsis
chgrp [options]
group file...
POSIX options: [-R] [--]
POSIX 1003.1-2001 options: [-hHLPR]
GNU group
denotation: [--reference=rfile]
GNU options (shortest form): [-cfvR] [--help]
[--version] [--]
Description
chgrp changes the group ownership of each given
file to
group, which can be either a group name or a numeric group ID.
Posix
Options
- -R
- Recursively change the group ownership of directories and their
contents. (And continue even when errors are encountered.)
- --
- Terminate option
list.
Austin Draft Options
- -h
- For each file operand given that is a symlink,
change the group ownership of the symlink itself, rather than the object
it points to. If the system does not support a group ownership for symlinks,
do nothing for a symlink.
- -H (half-logical)
- (When given together with -R.) For
each file operand given that is a symlink to a directory, change the group
ownership of the directory and all files in the file hierarchy below it.
- -L (logical)
- (When given together with -R.) For each file, either command
line operand or encountered during the tree walk, that is a symlink to
a directory, change the group ownership of the directory and all files
in the file hierarchy below it.
- -P (physical)
- (When given together with -R.)
For each file, either command line operand or encountered during the tree
walk, that is a symlink, change the group ownership of the symlink itself,
rather than the object it points to. If the system does not support a group
ownership for symlinks, do nothing for a symlink. This is the default.
- -R
- Recursively change the group ownership of directories and their contents.
Additional GNU Description
A GNU extension (new in fileutils 4.0) allows
one to use
--reference=rfile as a group description: the same group as that
of
rfile.
GNU Options
- -c, --changes
- Verbosely describe the action for each file
whose group actually changes.
- -f, --silent, --quiet
- Do not print error messages
about files whose group cannot be changed.
- -h, --no-dereference
- Act on symbolic
links themselves instead of what they point to. Only available if the lchown
system call is provided.
- -v, --verbose
- Verbosely describe the action or non-action
taken for every file.
- -R, --recursive
- Recursively change the group ownership
of directories and their contents.
GNU Standard Options
- --help
- Print a usage
message on standard output and exit successfully.
- --version
- Print version
information on standard output, then exit successfully.
- --
- Terminate option
list.
Environment
The variables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have
the usual meaning. For an XSI-conforming system: NLSPATH has the usual meaning.
Conforming to
POSIX 1003.2 only requires the -R option. Use of other options
may not be portable.
Notes
This page describes
chgrp as found in the fileutils-4.0
package; other versions may differ slightly. Mail corrections and additions
to aeb@cwi.nl. Report bugs in the program to fileutils-bugs@gnu.ai.mit.edu.
Add a comment | Add a link