Review your favorite Linux distribution.
Go Back > Blogs > Tantra Yantra Swatantrya
User Name


This blog is all about freedom of technology and machines.
Tantra means technology.
Yantra means machine.
Swatantrya means freedom.
Rate this Entry

Inode and its corresponding filename

Posted 07-21-2009 at 08:58 AM by Mr. ameya sathe

We refer to a file by its name. Computer refer to the file by its inode numbers. For every filesystem; there is an inode table. This table consists of Inode numbers & its correspondingmetadata. On the contrary; the mapping of filenames to inode numbers is stored in the directory containing the file.
To display the inode number of a file; say hindu one must issue the command
ls -i hindu
To display the total number of inode numbers in the filesystem ; you must issue the command
dumpe2fs  /dev/vol0/root
The output will show free inodes as well inodes.

To deduce a filename from any inode numbers present in your operating system; issue the command

find  /  -inum 1234
where; 1234 is the inode number.

Please note; inode tables are only unique to the filesystem & not to the complete operating system. Hence; if you see more than one entry in the output of above command; then it means that
  1. Hard Links present for the given inode number.
  2. The files are present on different filesystems.
Views 6651 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 03:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration