Friday, March 11, 2011

Notes on Inode

What is Inode:


Inode can be defined as a data structure which stores information about the file, directory, devices, filesystem object etc. Any file does have an inode number. All the files can be identified by its inode number. Let us see how to find out inode number.

Below are the contents of inode:

1. Ownership

2. File permissions

3. Type of file

4. File length

5. No. of links to file

6. Access privileges

7. Last modification time

8. Time of last inode change

9. Pointers to the files data

10. File allocation information

11. Direct and indirect extent information


How to find out the inode number of the file:

By using the option i along with ls command, we can find out inode of the file or directories

[root@MAYURA ~]# ls -ilrt

total 124

1056239 drwxrwxr-x 4 distcache 141 4096 Aug 4 2005 xen-2.0-install

1056721 drwxrwxr-x 6 root root 4096 Jan 8 2008 bridge-utils-1.4

1056003 -rw-r--r-- 1 root root 5177 Nov 2 04:22 install.log.syslog

inode number is highlighted in blue color.

No comments: