我有
$ ls -l
total 8
-rw-r--r-- 1 abc root 7 2011-09-18 19:41 a
-rw-r--r-- 1 abc root 7 2011-09-18 19:41 b
I do
$ strace -tt cat * >d
I get
$ stat d
File: `d'
Size: 14 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 2093326 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ abc) Gid: ( 0/ root)
Access: 2011-09-18 23:09:26.130876919 -0700
Modify: 2011-09-18 23:09:26.140844318 -0700
Change: 2011-09-18 23:09:26.140844318 -0700
为什么atime大于mtime和ctime?
但是当我这样做时:
$ ls -l
total 8
-rw-r--r-- 1 abc root 7 2011-09-18 19:41 a
-rw-r--r-- 1 abc root 7 2011-09-18 19:41 b
$ cat * >d
I get
$ stat d
File: `d'
Size: 14 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 2093326 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ abc) Gid: ( 0/ root)
Access: 2011-09-18 23:16:58.300875204 -0700
Modify: 2011-09-18 23:16:58.300875204 -0700
Change: 2011-09-18 23:16:58.300875204 -0700
这里所有时间都是一样的。为什么不同?
答案 0 :(得分:1)
Atime较低,而不是更大,这是有道理的,因为您正在写入文件,而atime只会在阅读时更新(在您的情况下创建它)。