LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Blogs > Tantra Yantra Swatantrya
User Name
Password

Notices

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
Code:
ls -i hindu
To display the total number of inode numbers in the filesystem ; you must issue the command
Code:
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

Code:
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 4495 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:13 AM.

Main Menu
Advertisement

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