-
Notifications
You must be signed in to change notification settings - Fork 0
Inode
Volodymyr Chernetskyi edited this page Dec 27, 2019
·
1 revision
The inode is a data structure that describes a file system object such as a file or a directory. Unlike block addresses, inode addresses start at 1.
Starting Byte | Ending Byte | Size In Bytes | Field Description |
---|---|---|---|
0 | 1 | 2 | Type and Permissions |
2 | 3 | 2 | User ID |
4 | 7 | 4 | Size in bytes |
8 | 11 | 4 | Last access time |
12 | 15 | 4 | Creation time |
16 | 19 | 4 | Last modification time |
20 | 23 | 4 | Deletion time |
24 | 25 | 2 | Group ID |
26 | 27 | 2 | Count of hard links (directory entries) to this inode |
28 | 31 | 4 | Count of disk sectors in use by this inode, not counting the actual inode structure nor directory entries linking to the inode |
32 | 39 | 8 | |
40 | 43 | 4 | Direct Block Pointer 0 |
44 | 47 | 4 | Direct Block Pointer 1 |
48 | 51 | 4 | Direct Block Pointer 2 |
52 | 55 | 4 | Direct Block Pointer 3 |
56 | 59 | 4 | Direct Block Pointer 4 |
60 | 63 | 4 | Direct Block Pointer 5 |
64 | 67 | 4 | Direct Block Pointer 6 |
68 | 71 | 4 | Direct Block Pointer 7 |
72 | 75 | 4 | Direct Block Pointer 8 |
76 | 79 | 4 | Direct Block Pointer 9 |
80 | 83 | 4 | Direct Block Pointer 10 |
84 | 87 | 4 | Direct Block Pointer 11 |
88 | 91 | 4 | Singly Indirect Block Pointer |
92 | 95 | 4 | Doubly Indirect Block Pointer |
96 | 99 | 4 | Triply Indirect Block Pointer |
100 | 119 | 20 | |
120 | 121 | 2 | High 16 bits of 32-bit User ID |
122 | 123 | 2 | High 16 bits of 32-bit Group ID |
124 | 127 | 4 |
Inode Type and Permissions
Type Value | Type Description |
---|---|
0x1000 | FIFO |
0x2000 | Character device |
0x4000 | Directory |
0x6000 | Block device |
0x8000 | Regular file |
0xA000 | Symbolic link |
0xC000 | Unix socket |
Permission Value | Permission Description |
---|---|
0x001 | Other - execute |
0x002 | Other - write |
0x004 | Other - read |
0x008 | Group - execute |
0x010 | Group - write |
0x020 | Group - read |
0x040 | User - execute |
0x080 | User - write |
0x100 | User - read |
0x200 | Sticky Bit |
0x400 | Set group ID |
0x800 | Set user ID |
This project is licensed under the MIT License © 2019 Volodymyr Chernetskyi, Andrii Koval