Inode
Inode is a fundamental concept in file systems that store information about files and directories. An inode (index node) is a data structure on a filesystem used to keep information about a file or a directory. The information stored by an inode can include attributes and disk block location(s) of the file's data. Inodes play a critical role in filesystems by providing the essential information needed to retrieve a file from the disk.
Overview[edit]
In a Unix-like operating system, every file, directory, and symbolic link is represented by an inode. The inode contains metadata about the file, such as its size, permissions (file system permissions), modification time, and the locations of the disk blocks that contain the file's data. However, it does not contain the file name or directory name; these are stored in a separate structure called a directory entry, which links the file name to its inode.
Structure[edit]
The structure of an inode can vary between different filesystems, but it typically includes the following information:
- File type (regular file, directory, symbolic link, etc.)
- Permissions (read, write, execute for owner, group, and others)
- Owner (UID) and group (GID)
- File size
- Time stamps (time of last access, time of last modification, time of last inode change)
- Link count (number of hard links to the file)
- Pointers to the disk blocks that store the file's content
Allocation[edit]
When a new file is created, the filesystem allocates an inode for the file and records its metadata within the inode. The number of inodes on a filesystem is determined when the filesystem is created. This means that a filesystem can run out of inodes even if there is still space available for storing data. When this happens, no new files can be created on the filesystem until inodes are freed up by deleting files or increasing the number of inodes.
Accessing Inodes[edit]
Users and programs do not directly interact with inodes; instead, they work with files and directories through their names. The operating system's kernel translates these names into the corresponding inodes to access the file's data and metadata. Tools like ls -i in Unix can display the inode number associated with each file, and the stat command can show the detailed information contained in an inode.
Inode Number[edit]
Each inode is identified by an inode number within the filesystem. This number is unique for each file within a filesystem but may be reused after a file is deleted. The inode number is used by the filesystem to index into an inode table to access the inode's data.
Limitations and Solutions[edit]
One limitation of inodes is the fixed number of inodes created when a filesystem is initialized, which can lead to inode exhaustion. Some modern filesystems, such as XFS and Btrfs, address this limitation by allowing the dynamic creation of inodes. Additionally, these filesystems introduce advanced features like snapshots and dynamic resizing, further enhancing the management and efficiency of inodes.
See Also[edit]
This article is a computer science stub. You can help WikiMD by expanding it!
Ad. Transform your health with W8MD Weight Loss, Sleep & MedSpa

Tired of being overweight?
Special offer:
Budget GLP-1 weight loss medications
- Semaglutide starting from $29.99/week and up with insurance for visit of $59.99 and up per week self pay.
- Tirzepatide starting from $45.00/week and up (dose dependent) or $69.99/week and up self pay
✔ Same-week appointments, evenings & weekends
Learn more:
- GLP-1 weight loss clinic NYC
- W8MD's NYC medical weight loss
- W8MD Philadelphia GLP-1 shots
- Philadelphia GLP-1 injections
- Affordable GLP-1 shots NYC
|
WikiMD Medical Encyclopedia |
Medical Disclaimer: WikiMD is for informational purposes only and is not a substitute for professional medical advice. Content may be inaccurate or outdated and should not be used for diagnosis or treatment. Always consult your healthcare provider for medical decisions. Verify information with trusted sources such as CDC.gov and NIH.gov. By using this site, you agree that WikiMD is not liable for any outcomes related to its content. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates, categories Wikipedia, licensed under CC BY SA or similar.
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian