With rsync --link-dest, is it possible to determine which files are new?

Eric Shubert ejs at shubes.net
Sat Oct 22 21:06:38 MDT 2011

On 10/22/2011 07:12 AM, Andrew Gideon wrote:
> On Fri, 21 Oct 2011 12:10:09 -0400, Kevin Korb wrote:
>> If you want something you can run after the fact here is a tool I wrote
>> a while back that does a sort of diff across 2 --link-dest based
>> backups:
>> http://sanitarium.net/unix_stuff/rspaghetti_backup/diff_backup.pl.txt It
>> will also tell you what files were not included in the newer backup
>> which --itemize-changes will not since it doesn't actually --delete
>> anything.
> I like how comprehensive this is, but wouldn't it - by definition of what
> it means to have a new file in the new directory tree - always report a
> modified file as having a different inode?
> That takes me a "quick and dirty" solution for this.  Simply do a find
> looking for files with a -links (link count) of 1 to see what files are
> newly copied in the newer directory tree.
> 	- Andrew

Sorry for re-posting your idea Andrew. Great minds think alike. ;)
That sometimes happens, especially in threaded view.

-Eric 'shubes'

More information about the rsync mailing list