1

When I list an inode with stat command:

  File: 'text'
  Size: 0           Blocks: 0          IO Block: 4096   regular empty file
Device: 802h/2050d  Inode: 8391119     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/  cagdas)   Gid: ( 1000/  cagdas)
Access: 2017-07-31 17:00:00.513753567 +0300
Modify: 2017-07-31 17:00:00.513753567 +0300
Change: 2017-07-31 17:00:00.513753567 +0300
 Birth: -

what does Device: 802h/2050d stand for? When I do stat on char or block devices from /dev, it is shown as Device: 6h/6d.

2

802 (hexadecimal) is the combination of the major and minor numbers (8, 2) of /dev/sda2 where the file text resides. The major number is placed in the most significant half of a 16-bit word, the minor number in the least significant half. For historical reasons the value is displayed like this, even though Linux since version 2.6 uses 32 bits for the device number (12 bits major, 20 bits minor). 2050 is the same value in decimal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.