In Linux using EXT filesystem, it will not, because a file name is not stored in a file, it is stored in the directory entry (dentry) that the file lives in, where the inode of the file is then mapped to a name. Changing a filename will have no affect on its md5sum in Linux. In Windows, I cannot be sure.
In ESXi (Precisely ESXi 5.5) md5sum on same content but different file names is different. That leads me to believe that VMFS-5 file structure includes file name too. If we are not concerned about file name, Is there a way to check only the md5sum of file content? I couldn't see any option. Any suggestions?
1.md5 is calculated based on binary content of the FILE.
2.File name,last modified etc. things are meta data.md5 not really rely on meta-data.
I have tested this with below steps,lets work with "last modified" meta-data
i)I have created a file named "a.txt" and added some content and created a hash
say hash is "xyz"
ii)Then I have just added a space in the file and again calculated the hash
say it returned "abc"
iii)I just removed my change in step (ii),on calculating hash again I have got the initial hash("xyz")
This concludes that even though the metadata of file is changed,the hash remains same till the file content remains unaltered.
This works only if one file is copy of another file but not when two different files with different names are generated with exactly same content.
I have tried this: