I've used a file deduplicator on a large folder with hundreds of thousands of files. The deduplicator created hardlinks for all duplicate files that it detected.

If I was to attempt to merge some directories that contain some hardlinks to the same files and allowed overwriting of the targets I expect that file corruption is possible.

In my case the filesystem is ZFS with a 3.14 kernel.

I don't want to accept what happens based on empirical evidence from the case of a test involving a few files. I want to know exactly the process involved to know if there is a risk of file corruption for various reasons like power interruption, or other unsolicited interruption.


If you were to user rsync with the '--ignore-existing' argument it aught to detect the duplicates and and copy everything else over.

rsync -ra  --ignore-exisiting /path/to/source /path/to/destination

I'd create a few test directories with identical files and some hard links thrown in them and do some trials to iron out any unforeseen 'kinks'.

You can even run it in 'test mode' first with the '-n' flag to make sure you get your arguments straight.

rsync -ran --ignore-existing /path/to/source /path/to/destination
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.