Hard-link confusion

The best solution for finding and removing duplicate files.
Post Reply
ashah042896
Posts: 2
Joined: Wed Dec 12, 2018 4:54 pm

Hard-link confusion

Post by ashah042896 » Wed Dec 12, 2018 5:00 pm

I am attempting to clean up our file server and want to do so using the Hard-Link creation feature available. I have created a test folder in the file server with a few duplicate files to test out the feature.

I scanned the folder, the duplicate files were recognized by the software, it allows me to create a hard-link, it gives me a confirmation saying the hard-link has been created, BUT there is no change in the folder which contains these files.

To my understanding, this software will remove the marked files and turn them into hard-links when working properly, correct? OR how does the hard-link feature work. Are the hard-links stored elsewhere? What can I do about these copied files? Does the hard-link option not work for duplicate files located in the same folder?

The test folder has only a few duplicate files and the hard-link feature is not working for some reason, I am trying to use this feature for the entire file server eventually which consists of about 250k duplicate files.

Thank you for your time.
User avatar
DigitalVolcano
Site Admin
Posts: 1128
Joined: Thu Jun 09, 2011 10:04 am

Re: Hard-link confusion

Post by DigitalVolcano » Wed Dec 12, 2018 7:05 pm

How are you checking that the files are not hard links? (Note these are not the same as shortcuts).

Is the drive NTFS formatted?

From the manual-

Hard links are only recommended for advanced users.
A hard link is a directory entry for a file. Every file can be considered to have at least one hard link. On NTFS volumes, each file can have multiple hard links, and thus a single file can appear in many directories (or even in the same directory with different names). Because all of the links reference the same file, programs can open any of the links and modify the file. A file is deleted from the file system only after all links to it have been deleted. After you create a hard link, programs can use it like any other file name.

You can only create hard links on NTFS volumes. You cannot create hard links between volumes (different hard drives or network shares). Duplicate Cleaner will only let you hard link same content files.

When creating Hard Links there needs to be at least one file in each duplicate group left unticked. This will be the 'original' file to which the other ticked files in the group are linked. Once linked there will appear to be no difference between the linked file and the original in Windows Explorer. In addition, hard linked files will appear again as duplicates if you re-scan, unless you have the 'Exclude hard linked files from duplicate list' menu option checked.
ashah042896
Posts: 2
Joined: Wed Dec 12, 2018 4:54 pm

Re: Hard-link confusion

Post by ashah042896 » Wed Dec 12, 2018 8:00 pm

Is it possible to turn files that are located in multiple different areas into shortcuts? or is there nothing that can be done with duplicate files except move or delete?

Yes, the drive is NTFS. I have also checked via dir in command prompt but no files appear.

There are many duplicated files that need to be where they are, but they are copy versions of the file rather than shortcut versions.
User avatar
DigitalVolcano
Site Admin
Posts: 1128
Joined: Thu Jun 09, 2011 10:04 am

Re: Hard-link confusion

Post by DigitalVolcano » Thu Dec 13, 2018 12:59 pm

The program doesn't currently support creating short-cuts (only hard-links). This is on our to-do list.

You can check whether files are hardlinked in Duplicate Cleaner by running a scan with the 'Count hard links in file' function enabled (Advanced search options).
dbague
Posts: 13
Joined: Mon Oct 02, 2017 6:35 pm

Re: Hard-link confusion

Post by dbague » Fri Jan 11, 2019 12:38 pm

DigitalVolcano wrote:
Thu Dec 13, 2018 12:59 pm
The program doesn't currently support creating short-cuts (only hard-links). This is on our to-do list.
If you have tried to implement symbolic links in version 4.1.1 as intended in another topic (edit here later for ref), then short-cuts should be a by-product (same care about non-symetry, one direction is priviledged).

my intersted in both type of links is in the context of multiple drives or volumes (hard-links excluded).

Motivation: Once i find that i have duplicate in different folders hierarchies, i may want to decide that one of those is less important for the data itself but that leaving a soft link as a breadcrumb, a reminder that i had put that file in that folder tree (and the semantic connections that it implies). to prevent me to put that file in there again, yet not loose all information. am i clear on intent?
User avatar
DigitalVolcano
Site Admin
Posts: 1128
Joined: Thu Jun 09, 2011 10:04 am

Re: Hard-link confusion

Post by DigitalVolcano » Tue Jan 15, 2019 12:36 pm

That makes sense. Shortcuts/symbolic links are now planned for version 5.0!
Post Reply