Check/compare modtime before deleting?

Matt McCutchen matt at mattmccutchen.net
Thu Aug 19 21:27:50 MDT 2010


On Thu, 2010-08-19 at 11:31 -0700, Chris wrote:
> I need to keep two identical copies of files on my desktop and laptop,
> so I want to use the -delete option.  But I don't want to delete files
> that are created after last sync.  Is there a way to keep files with
> modtime later than a file of a different name (a flag file created
> before each sync) when using the -delete option?

No.  As soon as you have one side making arbitrary changes that you
don't want to clobber, you need a stateful change-propagation tool such
as unison (http://www.cis.upenn.edu/~bcpierce/unison/).

-- 
Matt



More information about the rsync mailing list