Public bug reported:
*** SORRY FOR MY BAD ENGLISH ***
*** I was doing my daily exercise on the topic of timestamps.
--> How the timestamps of the particular file gets changed, when
we do some changes in that particular file.
1)--> ex:- cat
Access time is changed.
2)--> ex:- vi
If some modification is made in that particular file with
the help of vi editor.
then how the access,modification,change time of the
particular gets changed.
3)--> ex:- chmod
If we do chmod to a particular file only the change time of
that file gets changed.
4)-->ex:- touch
If we touch a file, then all the timestamp get changed.
*** I was using stat tool to check all the timestamps ***
*************************************************************************************************
HERE IS THE PROBLEM WHICH I AM FACING EVERYTIME,WHEN I DO STAT TO THAT
PARTICULAR FILE.
*************************************************************************************************
--> The inode number of that file gets changed, as I do any modification to
that file.
tux@ubuntu:~/pankaj$ uname -r
3.11.0-15-generic
tux@ubuntu:~/pankaj$ cat /etc/issue
Ubuntu 12.04.4 LTS \n \l
tux@ubuntu:~/pankaj$ touch test
tux@ubuntu:~/pankaj$ ls
test
tux@ubuntu:~/pankaj$ stat test
File: `test'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 801h/2049d Inode: 56640 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ tux) Gid: ( 1000/ tux)
Access: 2015-03-27 11:40:26.926255729 +0530
Modify: 2015-03-27 11:40:26.926255729 +0530
Change: 2015-03-27 11:40:26.926255729 +0530
Birth: -
tux@ubuntu:~/pankaj$ cat test
hello world
tux@ubuntu:~/pankaj$ stat test
File: `test'
Size: 12 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 56643 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ tux) Gid: ( 1000/ tux)
Access: 2015-03-27 11:43:48.011048224 +0530
Modify: 2015-03-27 11:43:48.011048224 +0530
Change: 2015-03-27 11:43:48.783020869 +0530
Birth: -
tux@ubuntu:~/pankaj$ cat test
hello world hello world
_____________________________________________________________________________
*** No changes made now in it, then the inode remains same.
tux@ubuntu:~/pankaj$ stat test
File: `test'
Size: 12 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 56643 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ tux) Gid: ( 1000/ tux)
Access: 2015-03-27 11:43:48.011048224 +0530
Modify: 2015-03-27 11:43:48.011048224 +0530
Change: 2015-03-27 11:43:48.783020869 +0530
Birth: -
tux@ubuntu:~/pankaj$
*************************************************************************************************
-> When I touched file named test & did stat on that file, the inode number was
56640.
-> But as I edit the same file and add something to it, its inode number
changed again to 56643.
-> Inode number should not change. then how come it gets changed !!!
** Affects: pigment (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1439201
Title:
Inode number of the particular file gets changed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pigment/+bug/1439201/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs