GNU/Linux Command – CHGRP

chgrp — Change the group ownership.

Summary :
`chgrp’ changes the group ownership of each given file(s) to the specified group (group name or a numeric group id).

Examples :
$ chgrp grp1 file1 -- Change the group ownership to grp1.No change in the user ownership. $ chgrp grp1 f1 f2 f3 -- Same as above, but for multiple files. $ chgrp 400 file1 -- Instead of Group name, Group id used. $ chgrp -R grp1 dir1 -- Recursively change group ownershipof the directory and their contents. $ chgrp -c grp1 f1 f2 f3 -- Show verbose output only when achange is made. $ chgrp -v grp1 f1 f2 f3 -- Show verbose output for every fileprocessed. $ chgrp -f grp1 f1 f2 f3 -- Force/Silent/Quiet. Do not printerror messages. $ chgrp --reference=that this -- Set 'that' file's group to 'this'. $ echo $GROUPS -- Show Group ID.
Note: Instead of Group name, Group ID also can be used.
Read : man chgrp

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: