Linux [Electronic resources]

Janet Valade

نسخه متنی -صفحه : 357/ 276
نمايش فراداده

chgrp (change group)

Changes the group owner of a file.

Format: chgrp

newgroup filename Examples: chgrp janet file27.txt

The file file27.txt now has the group owner janet. Only the owner of the file or the super user can change the group. If you attempt to change the group to a group that doesn't exist, an error message displays.

Opt

What It Does

Example

-c

Display info about file changes

chgrp -c janet file2 changed group of 'file2' to janet

-R

Make changes in all subdirectories

ls -R janet file3 changes file3 in any subdirectories, as well