3 kinds of timestamps 2023-02-15

2023-02-14  本文已影响0人  9_SooHyun

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

上一篇 下一篇

猜你喜欢

热点阅读