An inode stores basic information about a regular file, directory, or other file system object. It contains a list of direct, indirect, and doubly and triply indirect pointers. On some FileSystems, very small files can be stored directly in the Inode itself.
The inode number is a unique integer assigned to the device upon which it is stored. All files are hard links to inodes. Whenever a program refers to a file by name, the system conceptually uses the filename to search for the corresponding inode.
Sophisticated FileSystems create Inodes on demand, but with most, the number of Inodes on a Partition has to be decided on during FileSystem creation. It is rare to run out of Inodes unless you have an unusual usage profile such as storing a news spool or Squid cache. Exhaustion of the inodes will prohibit the creation of additional files even if sufficient HDD space exists.
Note : Inodes do NOT contain filenames.
For example PhilMurray's famous macaroni and cheese recipe:
$stat macaroni_and_cheese File: `macaroni_and_cheese' Size: 1965 Blocks: 8 IO Block: 4096 regular file Device: 305h/773d Inode: 2775423 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ staz) Gid: ( 1000/ staz) Access: 2007-05-16 00:21:17.000000000 +1200 Modify: 2007-05-16 00:21:16.000000000 +1200 Change: 2007-05-16 00:21:16.000000000 +1200
2 pages link to Inode: