zoukankan      html  css  js  c++  java
  • 文件访问时间简记(Modify time 和 Change time)

    [root@77-29-68-bx-core]# stat hql.out
      File: ‘hql.out’
      Size: 13750       Blocks: 32         IO Block: 4096   regular file
    Device: 807h/2055d  Inode: 195302554   Links: 1
    Access: (0664/-rw-rw-r--)  Uid: ( 1171/d1_pa)   Gid: ( 1172/d1_pa)
    Access: 2019-03-25 20:38:36.885282923 +0800
    Modify: 2019-03-25 20:38:36.150282730 +0800
    Change: 2019-03-25 20:38:36.150282730 +0800
     Birth: -
    [root@77-29-68-bx-core suanec-waic-job-from-weiclient-f7aa171b-58-35522803108336384]# chmod +x hql.out
    [root@77-29-68-bx-core suanec-waic-job-from-weiclient-f7aa171b-58-35522803108336384]# stat hql.out
      File: ‘hql.out’
      Size: 13750       Blocks: 32         IO Block: 4096   regular file
    Device: 807h/2055d  Inode: 195302554   Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: ( 1171/d1_pa)   Gid: ( 1172/d1_pa)
    Access: 2019-03-25 20:38:36.885282923 +0800
    Modify: 2019-03-25 20:38:36.150282730 +0800
    Change: 2019-03-26 11:20:30.613946678 +0800
     Birth: -
    [root@77-29-68-bx-core suanec-waic-job-from-weiclient-f7aa171b-58-35522803108336384]# du -sh ./hql.out
    16K ./hql.out
    [root@77-29-68-bx-core suanec-waic-job-from-weiclient-f7aa171b-58-35522803108336384]# stat hql.out
      File: ‘hql.out’
      Size: 13750       Blocks: 32         IO Block: 4096   regular file
    Device: 807h/2055d  Inode: 195302554   Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: ( 1171/d1_pa)   Gid: ( 1172/d1_pa)
    Access: 2019-03-25 20:38:36.885282923 +0800
    Modify: 2019-03-25 20:38:36.150282730 +0800
    Change: 2019-03-26 11:20:30.613946678 +0800
     Birth: -
    
    • 访问文件:vim/sh/bash/cat/more等操作会重置Access time
    • 读取文件属性:ls/stat/wc/du等操作不会重置Access time
    • 修改文件:会重置Modify time 和 Change time
    • 修改权限但不调整内容: 不会重置Modify time, 但会重置 Change time。
  • 相关阅读:
    StringBuild
    String 字符串
    win7 64位支持的最大内存
    Spring获取对象与java new对象区别
    生成随机数
    java String转base64
    java时间格式
    Bash Scripting Learn Notes
    Linux parent process and child process when 'sudo'
    Linux services, runlevels, and rc.d scripts
  • 原文地址:https://www.cnblogs.com/suanec/p/10599036.html
Copyright © 2011-2022 走看看