4

Linux常用命令-46:chown

 2 years ago
source link: https://xugaoxiang.com/2022/06/14/linux-cmds-46-chown/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

chown 命令用来改变文件或文件夹的所属用户及用户组,只有超级管理员才有权限执行。

语法格式:chown [参数]

常用参数:

9408b8a63e629e6e.png
# 将test.py文件的用户组和用户都改为xugaoxiang,冒号前的是用户,冒号后的是用户组,很多时候它们的名称是一样的
chown xugaoxiang:xugaoxiang test.py

# 递归修改文件夹
chown -R root:root test

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK