I have two hard disks mounted at src/ and tgt/ respectively. There are a enough hard links in src/ that rsync -a src/ tgt made the destination disk run out of space. I have learnt that I should have additionally used the -H option so that hard links in src/ become hard links in tgt/.

If I run rsync -aH src/ tgt now, will distinct files in tgt/ that are instead hardlinks in src/ be converted to hardlinks in tgt/ so that the disk doesn't run out of space?

(The clearest option seems to be to delete the contents of tgt/ and run rsync again with -H, but I am curious.)


Since you are considering deleting tgt anyway, why don't you try running rsync with -H to see what happens?

The hard links will be created and space will be saved.

  • Yes, this is a good point.
    – oadams
    Mar 8 '18 at 10:45

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.