about --link-dest

Matt McCutchen matt at mattmccutchen.net
Thu Dec 10 19:43:30 MST 2009


On Fri, 2009-12-11 at 01:25 +0100, Noel David Torres Taño wrote:
> I don't know what I'm doing bad, but --link-dest does not work for me:

> $ rsync -av --link-dest=$PWD/copy1 origin/ copy2

> Now I expect to see that the inode number of the kk file in copy2 is the same than the inode number of the file on copy1, but it isn't:
> 
> $ ls -li *
> copy1:
> total 4
> 1761436 -rw-r--r-- 1 envite envite 3 dic 10 14:04 kk
> 
> copy2:
> total 4
> 1761437 -rw-r--r-- 1 envite envite 3 dic 10 14:04 kk
> 
> origin:
> total 4
> 1761435 -rw-r--r-- 1 envite envite 3 dic 10 14:04 kk
> 
> And the file was unchanged, so it must be linked instead of copied:
> 
> $ diff origin/kk copy1/kk
> $
> 
> What is happening? Or what am I doing badly?

Pass -i to find out why rsync didn't use the file from copy1.  There
might be a difference in the seconds part of the mtime, which would not
show up in the "ls" output.

-- 
Matt



More information about the rsync mailing list