This is a bug, right? (--link-dest)

Randall Cotton recotton at
Mon Apr 5 15:38:19 MDT 2010

----- Original Message ----- 
From: "Matt McCutchen" <matt at>
To: "Randall Cotton" <recotton at>
Cc: <rsync at>
Sent: Monday, April 05, 2010 4:16 PM
Subject: Re: This is a bug, right? (--link-dest)

: On Mon, 2010-04-05 at 13:57 -0500, Randall Cotton wrote:
: > This works as expected (a hard link is made)
: > rsync -a --link-dest=../a.1 a/ b/a
: > This does not (a copy is made instead of a hard link)
: > rsync -a --link-dest=a.1 a b
: Not a bug.  The --link-dest argument needs to be given relative to the
: destination directory, even if the destination directory is given
: without a trailing slash.


Thanks for your response.

But I was aware of this requirement and I don't think I made an error in
this respect:

The directory structure is:

a (dir) -- tmp (file)

b (dir)
+---a.1 (dir) -- tmp (file)
+---a (dir) -- tmp (file)

So in the first case:
rsync -a --link-dest=../a.1 a/ b/a

it seems to me the link-dest directory ../a.1 is correctly specified
relative to the destination b/a

that is:

b/a/../a.1 resolves to b/a.1

and in the second case:

rsync -a --link-dest=a.1 a b

it seems to me that the link-dest directory a.1 is correctly specified
relative to the destination b

that is:


Or am I missing something here?

Do you get something different when you try the commands I've provided?


More information about the rsync mailing list