16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

chgrp<br />

Description<br />

Options<br />

Localization<br />

Exit Values<br />

Portability<br />

chgrp sets the group ID to group for the files and directories named by the<br />

pathname arguments. group can be a group name from a group database, or it can<br />

be a numeric group ID (GID).<br />

Rule: chgrp can be used only by the file owner or a superuser. The file owner must<br />

have the new group as his or her group or one of the supplementary groups.<br />

chgrp also turns off the set-user-ID bit and set-group -ID bit of the named files and<br />

directories.<br />

–f Does not issue an error message if chgrp cannot change the group ID. In<br />

this case, chgrp always returns a status of 0.<br />

–h Does not attempt to follow the symbolic link (or external link), but instead<br />

makes changes to the symbolic link (or external link) itself.<br />

–R If a pathname on the command line is the name of a directory, chgrp<br />

changes the group ID of all files and subdirectories in that directory. If<br />

chgrp cannot change some file or subdirectory in the directory, it continues<br />

to try to change the other files and subdirectories in the directory, but exits<br />

with a nonzero status.<br />

chgrp uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 You specified –f, or chgrp successfully changed the group ownership of all<br />

the specified files and directories.<br />

1 Failure due to any of the following:<br />

v Inability to access a specified file<br />

v Inability to change the group of a specified file<br />

v An irrecoverable error was encountered when you specified the –R<br />

option<br />

2 Failure due to any of the following:<br />

v The command line contained an unknown option or too few arguments<br />

v chgrp did not recognize the specified group<br />

P<strong>OS</strong>IX.2, X/Open Portability Guide, <strong>UNIX</strong> systems.<br />

The –f and –h options are an extension of the P<strong>OS</strong>IX standard.<br />

122 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!