Rsync hard-links devices with different mtimes despite -t: expected?

Matt McCutchen matt at mattmccutchen.net
Tue Oct 30 21:20:30 GMT 2007


I noticed that rsync is happy to hard-link a device node from a
--link-dest dir even if its mtime differs from that of the source device
node and --times is given.  Is this behavior expected?  It seems to
break the rule that a difference in preserved attributes disqualifies a
hard link.

To see the behavior, run the following as root:

mkdir src dest basis
mknod src/null c 1 3
sleep 1
mknod basis/null c 1 3
rsync -a -ii --link-dest=../basis/ src/ dest/
find . -ls
stat src/null dest/null

Rsync produces the following very bogus-looking itemize output:

.d          ./
hD..t...... null

Matt



More information about the rsync mailing list