-
What is inodelinux 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.
'linux' 카테고리의 다른 글
File permissions in Linux (0) 2023.02.21 Set default permissions for files and directories in Linux (0) 2023.02.21 File addressing in Linux (0) 2023.02.20 How to display file contents in linux (cat) (0) 2023.02.20 How to remove directory in linux (rmdir) (0) 2023.02.20