Networking / Beginners

The chgrp command

Every file has not only an individual owner, but also a group owner. You can change the group ownership using the chgrp command, which has the following basic syntax:

chgrp group file

For example, to grant the castaways group ownership of the file rescue. plans, use this command:

$ chgrp castaways rescue.plans

To change group ownership of all the files in the directory named /home/ island to castaways, use this command:

$ chgrp castaways /home/island
[Previous] [Contents] [Next]