document updated 15 years ago, on Nov 4, 2009
This is a pretty good overview of inodes. Interesting things to note:
- inodes don't contain the filename
- rather, inode numbers are more like IP addresses — once the OS translates a filename into an inode number, it will always prefer to refer to that file by its inode number rather than full filename (because sizeof(inode_num) is much smaller); while humans will always prefer the full filename
- hardlinks are links to a specific inode, and as such, they can't be created across filesystem boundaries
- ls -i to list the inode numbers for the current directory
- df -i to list the number of inodes that are free
- the only difference between mtime and ctime is:
- mtime is the last time the file's contents were changed
- ctime is the last time the file's inode was changed