I have created file named sometext
with random data inside. I wanted to check metadata of this file using several programs. I have used filefrag
and stat
program.
kd@kd-VPCEB2S1E ~/Downloads $ stat sometext
File: 'sometext'
Size: 16 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 6298184 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ kd) Gid: ( 1000/ kd)
Access: 2018-04-19 09:39:07.263246674 +0200
Modify: 2018-04-19 09:39:06.527234524 +0200
Change: 2018-04-19 09:39:06.527234524 +0200
Birth: -
kd@kd-VPCEB2S1E ~/Downloads $ filefrag -v sometext
Filesystem type is: ef53
File size of sometext is 16 (1 block of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 0: 25369307.. 25369307: 1: last,eof
sometext: 1 extent found
kd@kd-VPCEB2S1E ~/Downloads $
Both programs shows that the file size is 16 bytes
and the block
size is 4096 bytes
. So far so good, but stat
show that file takes 8 blocks
and filefrag
show that file takes 1 block
.
Why there is such big difference? What have I missed?