PAUSE
BOTCLEAN
ENCORE5
CLEAN
ENCORE
BOX
ILLUSTRATION
GO
The inode is a 64-byte data structure or record that defines
(characterizes) the file. We'll try to show you an inode structure
when defined in the C language. The left column contains data and the
bars on the right represent the relative size of the variables.
If you are unfamiliar with C, you can skip this graphic.
INODE
In particular an inode contains the mode and type of a file,
i.e. directory, character, block, special or ordinary:
Remember, the data structure appears on the left. The bars on the
right represent the relative size of the variables.
struct dinode {
short dimode;
The second element is the number of links to the file,
i.e. the number of times the file appears in the directory.
short di_nlink;
The third element is the file owner's user identification number.
short di_uid;
The fourth element is the file owner's group identification number.
short di_gid;
The fifth element is the file length in bytes.
long di_size;
The sixth element contains the file's physical address on the
disk. It consists of 13 addresses, each 3 bytes in length. Unused
addresses are set to 0. Note that 1 byte is unused.
char di_addr[40]; --------- 40 ------------
The seventh element is the time of the last access of the file.
long di_atime;
The eighth element is the time of the last modification.
long di_mtime;
The ninth element is the time when the file was created.
long di_ctime;
};