Chinaunix

标题: solaris文件系统的atime属性的问题 [打印本页]

作者: whpu000625    时间: 2013-06-24 18:14
标题: solaris文件系统的atime属性的问题
各位:

   文件系统的atime属性记录的是文件访问时间,当读取该文件的时候,该属性值就会改变。
   但是在solaris的zfs和ufs文件系统中发现,该属性值始终都没有改变
  1.    # echo "test" >test
  2.    # ls -atime test
  3.          4786 -rw-r--r--   1 root     root           5 Jun 24 19:12:44 2013 test
  4.    # cat test
  5.    test
  6.    # ls -atime test
  7.          4786 -rw-r--r--   1 root     root           5 Jun 24 19:12:44 2013 test
复制代码
请问是solaris故意的还是文件系统的bug
作者: whpu000625    时间: 2013-06-25 11:26
本帖最后由 whpu000625 于 2013-06-25 11:27 编辑

好吧,发现用-atime显示的不是access time,还是modify time
要使用ls -lu来显示atime的值
  1. #ls -lu --full-time test
  2. -rw-r--r--   1 root     root           0 2013-06-25 11:24:09.162879136 +0800 test
  3. # cat test
  4. test
  5. # ls -lu --full-time test
  6. -rw-r--r--+  1 root     root           0 2013-06-25 11:26:31.932687029 +0800 test
复制代码
发现atime的值改变了




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2