Linux 显示verbose/technical 文件信息

Linux show verbose/technical file information

是否有 GNU/Linux 命令显示有关文件的详细信息? 输出文件系统关于文件的所有(原始)技术信息的东西,例如使用的块、确切的创建和修改时间戳等

stat。示例:

echo foo > /tmp/bar ; stat /tmp/bar

输出:

  File: '/tmp/bar'
  Size: 4           Blocks: 8          IO Block: 4096   regular file
Device: 80bh/2059d  Inode: 87          Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/      woo)   Gid: ( 1000/      woo)
Access: 2017-05-21 23:34:23.770302257 -0400
Modify: 2017-05-21 23:34:23.770302257 -0400
Change: 2017-05-21 23:34:23.770302257 -0400
 Birth: -

我认为 stat 没有使用 所有 个块。 hdparm 可以做到,几乎...它显示的是扇区,而不是块;扇区地址也是相对于硬盘驱动器的,而不是文件系统:

hdparm --fibmap /tmp/bar

输出:

/tmp/bar:
 filesystem blocksize 4096, begins at LBA 253288448; assuming 512 byte sectors.
 byte_offset  begin_LBA    end_LBA    sectors
           0  253559088  253559095          8

对于文件系统块有 filefrag:

filefrag -v /tmp/bar

输出:

Filesystem type is: ef53
File size of /tmp/bar is 4 (1 block of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..       0:      33830..     33830:      1:             last,eof
/tmp/bar: 1 extent found