Commands

chgrp

[OPTION]… GROUP FILE

Change the group membership of the file(s) to GROUP. Group must be a valid option as defined in /etc/groups. Depending on your current access permissions for the target file, this command may or may not work for you. In general, if you already have access to FILE, you can grant access permission to someone else. If you do not currently have permission to access the file, you cannot grant access to yourself.

Example: To change the group ownership of the file testfile to group2, use

chgrp group2 testfile

Example: To recursively change the group ownership of all the files in the directory dir1 to group2, use

chgrp -R group2 dir1

-c, --changes Print out a confirmation for each file whose permission is successfully ...

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.