Device number in stat command output

前端 未结 5 598
渐次进展
渐次进展 2020-12-09 18:19
  stat test.log 
  File: `test.log\'
  Size: 573         Blocks: 8          IO Block: 4096   regular file
Device: 804h/2052d  Inode: 7091301     Links: 1
Access: (06         


        
5条回答
  •  遥遥无期
    2020-12-09 18:59

    The stat command is simply a frontend to the stat() system call.

    From the stat(2) manual page (man 2 stat)

    The st_dev field describes the device on which this file resides. (The major(3) and minor(3) macros may be useful to decompose the device ID in this field.)

    From the 0804 hex notation you get major=8 (/dev/sd*) minor=4. i.e. /dev/sda4

提交回复
热议问题