The inode is a unique identifier in Linux/UNIX filesystems, it’s also known as the index number.
Definition on nixCraft:
An inode is a data structure on a traditional Unix-style file system such as UFS
or ext3
. An inode stores basic information about a regular file, directory, or other file system object.
We can display the inode of a specific file name or a list of files in a directory by using the ls
command.
Here is a typical output of files inode inside a directory,
1 2 3 4 5 |
|
The numbers are the inodes of the respictive files.
One of the most common use of inodes is handling filenames with special characters or unicode like UTF-8, you cannot handle such filenames directly from the terminal, so you need to access it using its inode number.
My answer on StackOverflow to a related problem: http://stackoverflow.com/a/16216044/1708778
— Further reading: Understanding Filesystem Inodes (BSD DEVCENTER ONLamp.com)