Reply To: [File System] What is an inode

Home Forums Linux Questions & Answers.. Filesystem .. [File System] What is an inode Reply To: [File System] What is an inode

#2446
Humble
Keymaster

Well.. I can give some idea about inodes..
Obviously this comes under filsystems.. In simple terms filesystems are where the files and directories are structured.. Isnt it? .. When we think about filesystems there are mainly 2 parts..

1) The data and 2) The metadata..

What I mean by metadata ? metadata is the data about the data..

Lets take a “file” as an example.. The information about this file can be treated as metadata.. but whats that ?

*) File modification data
*) Owner of the file
*) File permission ..etc

I can show an example of a file called “foo.bar” from my filesystem and some information about it.

[hchiramm@humbles-lap ~]$ stat foo.bar
  File: ‘foo.bar’
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: 809h/2057d	Inode: 9443948     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/hchiramm)   Gid: ( 1000/hchiramm)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2013-07-14 17:35:05.996075662 +0530
Modify: 2013-07-14 17:35:00.799979118 +0530
Change: 2013-07-14 17:35:00.799979118 +0530
 Birth: -






Inodes  store this metadata information and typically they also store information about where the data is located on the storage media. Inodes are represented as an integer called inode number. In above example, the inode number of the file is "9443948 ".. Each file and directory in a filesystem is associated with an inode.. 



Also refer #http://en.wikipedia.org/wiki/Inode