chgrpchange the group ownership of files and/or directories |
Command |
chgrp
[-fR
]
group
pathname ...
chgrp
sets the group ID to group for the files and
directories named by the pathname arguments. group may be a group
name from the group database, or a numeric group ID.
-f
does not issue an error message if chgrp
cannot
change the group ID. In this case, chgrp
always
returns a status of zero.
-R
If a pathname on the command line is the name of a directory,
chgrp
changes the group ID of all files and
subdirectories under that directory. If chgrp
cannot
change some file or subdirectory under the directory, it continues to try
to change the other files and subdirectories under the directory, but
exits with a non-zero status.
0
You specified -f
, or chgrp
successfully changed the group ownership of all the specified files and
directories.
1
Failure due to any of the following:
-R
option2
Failure due to any of the following:
chgrp
did not recognize the specified group-f
option is an extension to the POSIX standard.