hum*_*ace 6 ext4 timestamps atime
使用ext4文件系统,我能够使用此处的方法读出文件的创建时间。结果,我确实得到了一个表,其中包含所crtime讨论的 inode(相应文件)的(创建时间)。
让我感到困惑并且我无法在 中找到答案的man debugfs是为什么它向我显示了 2 行crtime,而且甚至不是同一时间。
这是我得到的输出
[user ~] $ sudo debugfs -R "stat <274742>" /dev/sda2
debugfs 1.43.1 (08-Jun-2016)
Inode: 274742 Type: regular Mode: 0644 Flags: 0x80000
Generation: 3666549610 Version: 0x00000000:00000001
User: 1000 Group: 1000 Project: 0 Size: 0
File ACL: 0 Directory ACL: 0
Links: 0 Blockcount: 0
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x57b4c632:1e30ee34 -- Wed Aug 17 22:16:50 2016
atime: 0x57b4c4c0:afa082b0 -- Wed Aug 17 22:10:40 2016
mtime: 0x57b4c632:1e30ee34 -- Wed Aug 17 22:16:50 2016
crtime: 0x57b4c4c0:afa082b0 -- Wed Aug 17 22:10:40 2016
crtime: 0x57b4c632:(1e30ee34) -- Wed Aug 17 22:16:50 2016
Size of extra inode fields: 32
Run Code Online (Sandbox Code Playgroud)
另请注意,第二个(并不是真正正确的)crtime在括号中并等于mtime,因为我显然两次保存到文件中。
这是 e2fsprogs 补丁debugfs 中编辑错误的结果:添加支持以正确设置和显示扩展时间戳。第二个crtime:行应该是dtime :。
if (inode->i_dtime)
fprintf(out, "%scrtime: 0x%08x:(%08x) -- %s", prefix,
large_inode->i_dtime, large_inode->i_ctime_extra,
inode_time_to_string(inode->i_dtime,
large_inode->i_ctime_extra));
Run Code Online (Sandbox Code Playgroud)
我提交了一个错误报告。