What are inodes in linux?
An inode is a data structure that contains metadata about a file. When the file system stores a new file on the hard disk, it stores not only the contents (data) of the file, but also extra properties like the name of the file, the creation date, its permissions, the owner of the file, and more. All this information (except the name of the file and the contents of the file) is stored in the inode of the file. The ls -l command will display some of the inode contents, as seen in this screenshot #ls -ld <directory_name> The inode table contains all of the inodes and is created when you create the file system (with mkfs). You can use the df -i command to see how many inodes are used and free on mounted file systems. #df -i In the df -i screenshot above you can see the inode usage for several mounted file systems. You don’t see numbers for /dev/sda2 because it is a fat file system. inode number Inode number is also known as index number. It is a unique number assigned to files and directories while it is created. The inode number will be unique to entire filesystem. You can see the inode numbers with the ls -li command. #ls -li These three files were created one after the other and got three different inodes...
Read More