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。
  • 相关阅读:
    Java实现HttpClient发送GET、POST请求(https、http)
    解决.net core 3.1 json日期带T的问题
    Java验证身份证号码的格式
    c++20新特性concept
    位图
    Linux内核 hlist_head/hlist_node结构解析
    linux将c++程序制作成.deb
    应用程序或动态库中与加载的其他动态库的类或者函数重名问题
    vue props 属性值接受多个类型
    异步循环
  • 原文地址:https://www.cnblogs.com/suanec/p/10599036.html
Copyright © 2011-2022 走看看