返回列表 发帖

[Linux命令] 出师未捷 SOS!

刚接触linux,望各路老鸟指点12,不胜感激!问题如下:
(1)
[root@localhost home]# chmod 777 user/
[root@localhost home]# ll
total 8
drwx------                        3 test        test        4096 Aug 27 21:34 test
drwxrwxrwx        3 user        user        4096 Aug 27 21:34 user
(2)
[user@localhost user]$ touch mian.c
[user@localhost user]$ ll
total 0
-rw-rw-r--                        1 user        user        0 Aug 27 21:38 main.c
(3)
[test@localhost user]$ ll
total 0
-rw-rw-r--              1 user        user        0 Aug 27 21:38 main.c
[test@localhost user]$ vi main.c
(修改后:wq!退出)
total 4
-rw-rw-r--                        1 test        test        19 Aug 27 21:39 main.c

user 中的main.c文件怎么变成test   test的了,困惑中。

user user是指该文件的所有者是user,所在组是user

test test是指该文件的所有者是test,所在组是test
开源,人人为我,我为人人!

TOP

lz的意思是指为什么vi以后用户都变了。

TOP

返回列表