hardlinking missing files from src to a dest: didn't work way I thought it would.

Paul Slootman paul+rsync at wurtel.net
Thu Nov 14 09:54:46 UTC 2019

On Thu 14 Nov 2019, L A Walsh via rsync wrote:

> Have a directory with a bunch rpms in it, mostly x86_64.
> Have another directory with a bunch, mostly 'noarch'.
> Some of the noarch files are already in the x86_64 dir
> and don't want to overwrite them.  They are on the same
> physical disk, so really, just want the new 'noarch' files
> hardlinked into the destination.
> sitting in the noarch dir, I tried:
> rsync -auv --ignore-existing  \
>       --link-dest=/tumbleweed/. . /tumbleweed/.

This is not going to do anything useful, as you're telling it to look in
/tumbleweed/ for files that are to be placed in /tumbleweed/ i.e. the
exact same location. It's not going to do

    ln /tumbleweed/foo/bar /tumbleweed/foo/bar

which is effectively what you're telling it to do.

You need to specify the source directory as the link-dest directory.


More information about the rsync mailing list