美文网首页
3 kinds of timestamps 2023-02-15

3 kinds of timestamps 2023-02-15

作者: 9_SooHyun | 来源:发表于2023-02-14 16:35 被阅读0次

    3 kinds of timestamps

    Access - the last time the file was read
    Modify - the last time the file was modified (content has been modified)
    Change - the last time meta data(the data stored in inode) of the file was changed (e.g. permissions)

    To display this information, you can use stat which is part of the coreutils.

    [root@TEN /]# stat test.tgz 
      File: test.tgz
      Size: 43816570        Blocks: 85584      IO Block: 4096   regular file
    Device: 10302h/66306d   Inode: 416278      Links: 1
    Access: (0666/-rw-rw-rw-)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2023-02-15 14:44:53.000000000 +0800
    Modify: 2023-01-16 17:35:14.000000000 +0800
    Change: 2023-02-15 14:44:53.117573290 +0800
     Birth: 2023-02-15 14:44:52.753572208 +0800  # 文件在本机的createtime
    [root@TEN /]# 
    

    Some file systems support an additional entry in the inode regarding the creation time (or birth time). I know that ext4 supports this feature and also JFS and BTRFS.

    ls -l显示的是mtime

    相关文章

      网友评论

          本文标题:3 kinds of timestamps 2023-02-15

          本文链接:https://www.haomeiwen.com/subject/xrmekdtx.html