Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done DEDUPE suggestion

Apr
5
0
DEDUPE suggestion:

Add switches:
/H Convert duplicate files to hardlinks to the first file. Note that to create hardlinks, you do NOT need to be in an elevated session. Also note, that hardlinks ONLY works when the files are located on the same physical device. If you want to use symlinks when hardlinks aren't possible, also add /L switch (/H switch takes precedence).
/K Keep the file's time stamp when replacing it with a symlink/hardlink
 
That's not true. Attributes and time stamps are preserved individually for each hardlink. The following two files are the same physical file (hardlinked using MKLINK /H command and then updated using TOUCH and ATTRIB commands):

30-11-2017 05:53 1.445.888 R__A___________ zes.exe
27-05-2017 05:53 1.445.888 ___A___________ zeus.exe

As you can see they have different time stamps and attributes.
 
No can do (at the moment), but I will check next time I reboot...

It would be strange, however, if the information changed. Also - which one in a (possible) bunch of 100+ different hardlinks with (possibly) different time stamps and/or attributes would it use as a basis for the new information? That sounds odd if that is so...
 
Just bring up properties of any other the link after changing the one. You'll see they all match your changes.
Every hard link is just a new reference to the same $MFT entry.
 
Okay - so you mean that it's not the reboot per se, that resets it (ie. not active code that "copies" the information to the other hardlinks). It's because of a cache or something that the information in a file list can appear to be different? I would consider this a bug in Windows (that it doesn't update the cache with the correct information), if that is indeed so... Anyway, if that is the case (and I have no reason to doubt it), the /K switch would only have effect on symbolic links and not on hardlinks. It should probably be mentioned in the help for the (possibly future) /K switch that hardlinks cannot have different information.
 
It updates the cache when it matters (i.e. when attributes are requested explicitly).
Any caching by definition is a compromize between performance and precision.
 
I would consider "FindFirst/FindNext" (listing a directory) as "attributes are requested explicitly", and the fact that Windows can return incorrect (out-of-date) information is a bug, IMNSHO. But that's a discussion for another forum. My suggestion still stands, however, except the time stamp preservation for hardlinks.
 

Similar threads

Back
Top