2.15 更改 所有者 和 所属组 chown

命令:chown (change owner)
功能:更改 目标对象(目录 或 文件) 所有者 或 所属组
语法:chown -R username:group filename
例子:
chown root:root 1.txt
只修改 所属主:
chown root: 1.txt
只修改 所属组:
chown :root 1.txt 相当于 chgrp root 1.txt
递归修改目录及子目录与文件
chown -R root:root dir/

猜你喜欢

转载自blog.csdn.net/hx_7_8_9/article/details/82684841