- 论坛徽章:
- 0
|
Note in output from the ls command in Section 4.12 that the files core and core.copy have different access permissions. If the umask value didn't change between the creation of the two files, explain how the difference could have occurred.
$ cat core > core.copy
$ ls -l core*
-rw-r--r-- 1 sar 8483248 Nov 18 12:18 core
-rw-rw-r-- 1 sar 8483248 Nov 18 12:27 core.copy
$ du -s core*
272 core
16592 core.copy
首先上面的英文部分是书中的原文
$ ls -l core*
-rw-r--r-- 1 sar 8483248 Nov 18 12:18 core
-rw-rw-r-- 1 sar 8483248 Nov 18 12:27 core.copy
这里的core 和core.copy的文件属性变了 core.copy多了一个组可读
我是用的umask 022和文中用的一样但是在我的机子上试验的时候core.copy的属性没有变
我的问题是1为什么书上说是变的呢 ,想不通
2为什么我系统上的就没有变了
谢谢二楼 根据二楼的提示我把umask改为664 发现cat core > core.copy以后的文件属性确实变了 ,多了一个组可读,和其他用户可读,那着有是什么道理啊,弄糊涂了(其实好象也是不变的 首先建一个文件 然后在用cat core > core.copy 也没有多什么属性啊)
[ 本帖最后由 uid500 于 2008-9-14 19:38 编辑 ] |
|