chgrp
命令功能:
改变文件所属用户组
语法:
chgrp [-R] dirname/filename...
选项与参数:
-R :进行递归(recursive)的持续更改,也即连同子目录下的所有文件、目录
[root@yubing ~]# ll
总计 152
-rw------- 1 root root 888 04-13 18:48 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 04-18 16:39 {cat
-rw-r--r-- 1 root root 23947 04-13 18:48 install.log
-rw-r--r-- 1 root root 0 04-13 18:39 install.log.syslog
drwxr-xr-x 3 root root 4096 04-21 09:08 oldboy
-rw-r--r-- 1 root root 425 04-14 14:13 oldboy.tar.gz
-rw-r--r-- 1 root root 90300 04-18 15:39 svn-acount-tmp.txt
-rw-r--r-- 1 yubing1 yubinggrp1 213 04-13 23:02 yubing.txt
[root@yubing ~]# chgrp yubinggrp yubing.txt 改变文件用户组
[root@yubing ~]# ll
总计 152
-rw------- 1 root root 888 04-13 18:48 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 04-18 16:39 {cat
-rw-r--r-- 1 root root 23947 04-13 18:48 install.log
-rw-r--r-- 1 root root 0 04-13 18:39 install.log.syslog
drwxr-xr-x 3 root root 4096 04-21 09:08 oldboy
-rw-r--r-- 1 root root 425 04-14 14:13 oldboy.tar.gz
-rw-r--r-- 1 root root 90300 04-18 15:39 svn-acount-tmp.txt
-rw-r--r-- 1 yubing1 yubinggrp 213 04-13 23:02 yubing.txt
[root@yubing ~]#
转载于:https://blog.51cto.com/yubing208/1194408