linux更改一个文件f1的用户主为user,用户组为group代码
chown user:group /path/to/f1
比如.profile先前的owner和group都是root
root@cyper-pc:/home/dasusr1# ls -al /home/dasusr1/.profile
-rw-r--r-- 1 root root 675 Jan 6 00:09 /home/dasusr1/.profile
使用chown命令更改之:
root@cyper-pc:/home/dasusr1# chown dasusr1:dasadm .profile
重新查看:
root@cyper-pc:/home/dasusr1# ls -al /home/dasusr1/.profile
-rw-r--r-- 1 dasusr1 dasadm 675 Jan 6 00:09 /home/dasusr1/.profile