我需要知道文件的创建时间。我试图运行该stat filename
命令。但是我的 fs 不会将文件创建时间存储为元数据。
[root@s1 XYZ]# stat ./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp
File: `./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp'
Size: 16241 Blocks: 32 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 129108489 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 509/ UNKNOWN) Gid: ( 509/ UNKNOWN)
Access: 2018-03-07 12:28:31.000000000 +0200
Modify: 2018-03-07 07:04:15.000000000 +0200
Change: 2018-03-07 12:28:31.468075157 +0200
但是,我阅读了这个站点并使用了 debugfs 命令。它显示 crtime(创建时间)。但是显示的创建时间大于(更新)修改时间。怎么了?
[root@s1 XYZ]# ls -i ./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp
129108489 ./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp
[root@s1 XYZ]# df -T ./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/datavg-datalv ext4 5986257120 5645927428 36483732 100% /data
[root@s1 fcs_backup]# debugfs -R 'stat <129108489>' /dev/mapper/datavg-datalv
debugfs 1.41.12 (17-May-2010)
Inode: 129108489 Type: regular Mode: 0644 Flags: 0x80000
Generation: 3953510053 Version: 0x00000000:00000001
User: 509 Group: 509 Size: 16241
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 32
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x5a9fbecf:6f990a54 -- Wed Mar 7 12:28:31 2018
atime: 0x5a9fbecf:00000000 -- Wed Mar 7 12:28:31 2018
mtime: 0x5a9f72cf:00000000 -- Wed Mar 7 07:04:15 2018
crtime: 0x5a9fbecf:6f990a54 -- Wed Mar 7 12:28:31 2018
Size of extra inode fields: 28
EXTENTS:
(0-3): 516503300-516503303
编辑 的文件未打开。我以同样的方式运行。
[root@s1 XYZ]# stat ./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp
File: `./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp'
Size: 16241 Blocks: 32 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 129108489 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 509/ UNKNOWN) Gid: ( 509/ UNKNOWN)
Access: 2018-03-07 12:28:31.000000000 +0200
Modify: 2018-03-07 07:04:15.000000000 +0200
Change: 2018-03-07 12:28:31.468075157 +0200
[root@s1 XYZ]# debugfs -R 'stat <129108489>' /dev/mapper/datavg-datalv
debugfs 1.41.12 (17-May-2010)
Inode: 129108489 Type: regular Mode: 0644 Flags: 0x80000
Generation: 3953510053 Version: 0x00000000:00000001
User: 509 Group: 509 Size: 16241
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 32
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x5a9fbecf:6f990a54 -- Wed Mar 7 12:28:31 2018
atime: 0x5a9fbecf:00000000 -- Wed Mar 7 12:28:31 2018
mtime: 0x5a9f72cf:00000000 -- Wed Mar 7 07:04:15 2018
crtime: 0x5a9fbecf:6f990a54 -- Wed Mar 7 12:28:31 2018
Size of extra inode fields: 28
EXTENTS:
(0-3): 516503300-516503303
[root@s1 XYZ]# lsof ./px/cd/78/cd78eholuefekgpz6c0snn5oaayypnloqxgfivszd5d.mxp
[root@s1 XYZ]#