Change Group Linux Command Options
Linux Command: chgrpUsage: change group ownership
Chgrp Syntax: # chgrp [options] newgroup filename/directoryname
Example For chgrp Command:
1. To change a file sample.txt from root group to a new group
named 'group2'
# chgrp group2 sample.txt
2. To change the files and its subdirectories of a directory named
'test' from root group to new
group 'newgroup'
# chgrp -R newgroup test
3. To change the group for the specific file test.txt
# chgrp -c newgroup test.txt
4. To use the group value of another file instead of specifying explicitly
# chgrp --reference=/home/dhana/sample
No comments:
Post a Comment