ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • What is inode
    linux 2023. 2. 20. 17:00

    In Linux and other Unix-like operating systems, an inode (short for index node) is a data structure that contains information about a file or directory. Each file or directory on a Linux filesystem has a unique inode number, which is used by the system to identify and access the file.

    The information stored in an inode includes the following:

    • File type (regular file, directory, symbolic link, etc.)
    • File permissions (read, write, execute) for the owner, group, and other users
    • Timestamps (last access, last modification, last status change)
    • File size
    • Pointers to the blocks on the disk where the file's data is stored

    When a file is created in Linux, the system creates an inode for the file and assigns it a unique inode number. The inode is stored in a special area of the filesystem, separate from the file's data blocks. When a program wants to read or write a file, it first looks up the file's inode to obtain information about the file's location and permissions, and then uses this information to access the file's data on the disk.

    Inode numbers are only meaningful within a specific filesystem. When a file is moved between filesystems (for example, by copying it to a different disk), it is assigned a new inode number in the new filesystem.

Designed by Tistory.