I am trying to understand what it happens to a file when I move it from a directory to another, inside the same File System.
Here is the example I made up.
I have two directories and a file :
~/Documents/dir1
~/Documents/dir2
~/Documents/dir1/fileName.txt
Here I have some details about the file fileName.txt
(ls -li
):
784088 -rw-r--r-- 1 myUser myUser 0 Oct 25 02:18 fileName.txt
Then, I moved the file fileName.txt
from dir1
to dir2
by issuing the following command:
~/Documents/dir1$ mv fileName.txt ../dir2
and here I have the details about the file fileName.txt
(ls -li
) after having issued mv
:
784088 -rw-r--r-- 1 myUser myUser 0 Oct 25 02:22 fileName.txt
What I expected was a change of inode number, but I was wrong . So, for what I have understood up to now, by moving a file inside the same File System:
- the data block is not touched (that's good to me)
- the inode (that is strange to me)
Can anyone tell me then what it changes in file properties (apart from modification time)?
Thank you in advance, really.