Fwd: [PLUG] Weird Inode values
ashu.adkar at gmail.com
Mon Jan 22 21:20:01 IST 2007
---------- Forwarded message ----------
From: K. Shantanu <linux at shantanukulkarni.org>
Date: Jan 22, 2007 9:12 PM
Subject: Re: [PLUG] Weird Inode values
To: Pune GNU/Linux Users Group Mailing List <plug-mail at plug.org.in>
* 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
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.
No.I know 'touch' shouldn't change the inode value.Thats what the whole
issue is.I do a 'touch' on a particular file and then if I use 'stat' I see
a different inode value.
Pune GNU/Linux Users Group Mailing List: (plug-mail at plug.org.in)
List Information: http://plug.org.in/cgi-bin/mailman/listinfo/plug-mail
Send 'help' to plug-mail-request at plug.org.in for mailing instructions.
More information about the Plug-mail