[PLUG] Weird Inode values

K. Shantanu linux at shantanukulkarni.org
Mon Jan 22 07:42:24 PST 2007


* Ashutosh Adkar <ashu.adkar at gmail.com> [070121 17:38]:
> >How are you modifying the file? With text editor I believe.
> >
> 
> vi of course.But what the heck.Even a 'touch' command changes the inode
> >value

I think you are getting confused. "touch" does not change inode number,
it changes inode data essentially modification and access time date
stamps by default. vi (like some editors and some other utilities),
makes a copy of the current file and then removes the file when the
user saves the file, the copy is "re-saved" to the original position and
hence the inode is changed. If you want to cross check, make a hard link
to the file and then edit the file using vi and you will find the inode
will not be changed.

Shantanu
www.shantanukulkarni.org
-- 



More information about the plug-mail mailing list