Hardlink files not the same

Posted by SabreWolfy on Server Fault See other posts from Server Fault or by SabreWolfy
Published on 2011-01-17T10:22:50Z Indexed on 2011/01/17 10:54 UTC
Read the original article Hit count: 378

Filed under:

I created a hardlink of a file as follows:

ln /path/to/source/file1 /path/to/target/file2

Using md5sum, the two files are identical. After a while, the source file has been modified by another program. The target file does not get "updated". The md5sums are now different. The files are on the same partition of course, otherwise I could not create a link.

What I'm trying to do is get a copy of the source file into the target folder (which is versioned), so that I have access to the source file elsewhere.

I tried moving the source file to the target folder with a different name and then creating a symlink to it at the source, but the program expecting the file then (somehow) created a file of the name it wanted in the target folder.

Ideas?

© Server Fault or respective owner

Related posts about hardlink