修改文件的所有者与所属组
小结
修改文件file1的所有者为zs,所属组为it
?
chown zs.it file1
修改文件file1的所属组为hr
?
chown .hr file1
修改文件file1的所有者为xc
?
chown xc file1
只修改所属者

chown 用户名 文件名
chown root aa.txt
只修改文件所属组

同时修改所有者与所属组

把文件的所有者改为python,所属组改为root
chown python.root aa.txt
[python@localhost testdir]$ sudo chown python.root aa.txt
小结

本文详细介绍了如何使用chown命令来修改文件的所有者和所属组。包括仅修改所有者、仅修改所属组以及同时修改所有者和所属组的具体操作方法。
3104

被折叠的 条评论
为什么被折叠?



