用 stat 查询日期
[root@localhost ~]# stat initial-setup-ks.cfg
File: ‘initial-setup-ks.cfg’
Size: 1270 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 138554194 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:admin_home_t:s0
Access: 2021-03-06 16:42:35.466057028 +0800
Modify: 2021-03-06 16:42:35.468057028 +0800
Change: 2021-03-06 16:42:35.468057028 +0800
Birth: -
用 touch 修改
touch -d "2021-03-06 10:42:35.466057028 +0800" initial-setup-ks.cfg
在用 stat查看
[root@localhost ~]# stat initial-setup-ks.cfg
File: ‘initial-setup-ks.cfg’
Size: 1270 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 138554194 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:admin_home_t:s0
Access: 2021-03-06 10:42:35.466057028 +0800
Modify: 2021-03-06 10:42:35.466057028 +0800
Change: 2021-03-29 22:15:55.109784614 +0800
Birth: -
如果用如下修改
touch -d "21:33" initial-setup-ks.cfg
结果是
[root@localhost ~]# stat initial-setup-ks.cfg
File: ‘initial-setup-ks.cfg’
Size: 1270 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 138554194 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:admin_home_t:s0
Access: 2021-03-29 21:33:00.000000000 +0800
Modify: 2021-03-29 21:33:00.000000000 +0800
Change: 2021-03-29 22:18:22.666780756 +0800
Birth: -
0000000看上区比较异常
21-3-29