Device number in stat command output

前端 未结 5 606
渐次进展
渐次进展 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 19:04

    # stat tool
      File: `tool'
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: 801h/2049d      Inode: 671689      Links: 3
    
    # ls -l /dev/sda* 
    brw-rw---- 1 root disk 8, 0 2010-08-16 14:43 /dev/sda
    brw-rw---- 1 root disk 8, 1 2010-08-16 14:43 /dev/sda1
    brw-rw---- 1 root disk 8, 2 2010-08-16 14:43 /dev/sda2
    brw-rw---- 1 root disk 8, 5 2010-08-16 14:43 /dev/sda5
    

    In the example, 'tool'(801h) is in /dev/sda1(major device number is 8, minor device number is 1), that's first partition in /dev/sda.

提交回复
热议问题