• Linux的文件的修改时间(mtime)、访问时间(atime)和状态时间(ctime)


    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:0             块:0          IO 块:4096   普通空文件
    设备:fd00h/64768d    Inode:444753      硬链接:1
    权限:(0644/-rw-r--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 15:15:33.000000000 +0800
    最近更改:2024-06-02 15:15:33.000000000 +0800
    最近改动:2024-06-02 15:39:53.488613915 +0800
    创建时间:2024-06-02 15:39:53.488613915 +0800
    [root@rhel /]# ls -al a.txt
    -rw-r--r--. 1 root root 0  6月  2 15:15 a.txt
    [root@rhel /]# chmod u+x a.txt
    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:0             块:0          IO 块:4096   普通空文件
    设备:fd00h/64768d    Inode:444753      硬链接:1
    权限:(0744/-rwxr--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 15:15:33.000000000 +0800
    最近更改:2024-06-02 15:15:33.000000000 +0800
    最近改动:2024-06-02 16:13:18.542018250 +0800
    创建时间:2024-06-02 15:39:53.488613915 +0800
    [root@rhel /]# date
    2024年 06月 02日 星期日 16:13:26 CST
    [root@rhel /]# cat a.txt
    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:0             块:0          IO 块:4096   普通空文件
    设备:fd00h/64768d    Inode:444753      硬链接:1
    权限:(0744/-rwxr--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 16:14:16.450603919 +0800
    最近更改:2024-06-02 15:15:33.000000000 +0800
    最近改动:2024-06-02 16:13:18.542018250 +0800
    创建时间:2024-06-02 15:39:53.488613915 +0800
    [root@rhel /]# date
    2024年 06月 02日 星期日 16:14:26 CST
    [root@rhel /]# vim a.txt
    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:0             块:0          IO 块:4096   普通空文件
    设备:fd00h/64768d    Inode:444753      硬链接:1
    权限:(0744/-rwxr--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 16:14:16.450603919 +0800
    最近更改:2024-06-02 15:15:33.000000000 +0800
    最近改动:2024-06-02 16:13:18.542018250 +0800
    创建时间:2024-06-02 15:39:53.488613915 +0800
    [root@rhel /]# vim a.txt
    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:14            块:8          IO 块:4096   普通文件
    设备:fd00h/64768d    Inode:693379      硬链接:1
    权限:(0744/-rwxr--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 16:16:43.511877614 +0800
    最近更改:2024-06-02 16:16:43.511877614 +0800
    最近改动:2024-06-02 16:16:43.516830329 +0800
    创建时间:2024-06-02 16:16:43.511877614 +0800
    [root@rhel /]# date
    2024年 06月 02日 星期日 16:16:49 CST
    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:14            块:8          IO 块:4096   普通文件
    设备:fd00h/64768d    Inode:693379      硬链接:1
    权限:(0744/-rwxr--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 16:16:43.511877614 +0800
    最近更改:2024-06-02 16:16:43.511877614 +0800
    最近改动:2024-06-02 16:16:43.516830329 +0800
    创建时间:2024-06-02 16:16:43.511877614 +0800
    [root@rhel /]# vim a.txt
    [root@rhel /]# date
    2024年 06月 02日 星期日 16:17:55 CST
    [root@rhel /]# stat a.txt
      文件:a.txt
      大小:22            块:8          IO 块:4096   普通文件
    设备:fd00h/64768d    Inode:693378      硬链接:1
    权限:(0744/-rwxr--r--)  Uid:(    0/    root)   Gid:(    0/    root)
    环境:unconfined_u:object_r:etc_runtime_t:s0
    最近访问:2024-06-02 16:17:52.497930341 +0800
    最近更改:2024-06-02 16:17:52.497930341 +0800
    最近改动:2024-06-02 16:17:52.500027815 +0800
    创建时间:2024-06-02 16:17:52.497930341 +0800
    [root@rhel /]# 
     

  • 相关阅读:
    江苏大信环境科技有限公司:环保领域的开拓者与引领者
    如何学习java
    免费小程序商城搭建之b2b2c o2o 多商家入驻商城 直播带货商城 电子商务b2b2c o2o 多商家入驻商城 直播带货商城 电子商务
    汽车空调器前缸盖数控加工工艺的制订及夹具设计
    iOS原生应用集成Uni小程序SDK教程
    Spring中常用的注解
    Java如何创建支付接口
    Java注解系统学习与实战
    Python3操作redis百万级数据迁移,单机到单机,集群到集群
    【C++入门】命名空间详解(从零开始,冲击蓝桥杯)
  • 原文地址:https://blog.csdn.net/zyex1108/article/details/139393450