chgrp ( 1 ) USER COMMANDSchgrp ( 1 )


NAME

chgrp - change the group ownership of files

SYNOPSIS

chgrp [ options ] [[owner:]group] file ...

DESCRIPTION

chgrp changes the group ownership of each file to group, which can be either a group name or a numeric group id. The user ownership of each file may also be changed to user by prepending user: to the group name.

OPTIONS

-c, --changes
Describe only files whose ownership actually changes.
-f, --quiet|silent
Do not report files whose ownership fails to change.
-l|h, --symlink
Change the ownership of the symbolic links on systems that support this.
-m, --map
The first operand is interpreted as a file that contains a map of from_uid:from_gid to_uid:to_gid pairs. Ownership of files matching the from part of any pair is changed to the corresponding to part of the pair. The process stops at the first match for each file. Unmatched files are silently ignored.
-n, --show
Show actions but don't execute.
-r, --reference=file
Omit the explicit ownership operand and use the ownership of file instead.
-v, --verbose
Describe changed permissions of all files.
-H, --metaphysical
Follow symbolic links for command arguments; otherwise don't follow symbolic links when traversing directories.
-L, --logical|follow
Follow symbolic links when traversing directories.
-P, --physical|nofollow
Don't follow symbolic links when traversing directories.
-R, --recursive
Recursively change ownership of directories and their contents.
-X, --test
Canonicalize output for testing.

EXIT STATUS

0
All files changed successfully.
>0
Unable to change ownership of one or more files.

SEE ALSO

chmod(1), tw(1), getconf(1), ls(1)

IMPLEMENTATION

version
chgrp (AT&T Research) 2006-10-11
author
Glenn Fowler <gsf@research.att.com>
author
David Korn <dgk@research.att.com>
copyright
Copyright © 1992-2008 AT&T Intellectual Property
license
http://www.opensource.org/licenses/cpl1.0.txt