Eu preciso saber o tempo de criação de um arquivo. Tentei executar o stat filename
comando. Mas meu fs não armazena o tempo de criação do arquivo como metadados.
[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
No entanto, li este site e usei o comando debugfs. Ele mostra crtime (tempo de criação). Mas o tempo de criação mostrado é maior (mais recente) do que o tempo de modificação. O que está errado?
[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
O arquivo editado não é aberto. Eu corro pelo mesmo caminho.
[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]#