js_spamfree-rsync at yahoo.com
2010-Mar-02 16:47 UTC
copying differences to different directory
sorry for the confusing subject line. i couldn't think of a better way to say it. i'm wondering if rsync can perform the following action: Compare contents of Directory A (master) to Directory B and copy any differences from Directory A to Directory C (example below) Directory A: foo bar biz nis sum tin Directory B: foo biz nis sum Directory C: (empty prior to rsync operation) bar tin (both bar and tin copied from Directory A) Any assistance that can be provided will be, of course, very appreciated. --john
On Tue, 2010-03-02 at 08:47 -0800, js_spamfree-rsync at yahoo.com wrote:> sorry for the confusing subject line. i couldn't think of a better way > to say it. > > i'm wondering if rsync can perform the following action: > > Compare contents of Directory A (master) to Directory B and copy any > differences from Directory A to Directory C (example below)You want --compare-dest. Note that --compare-dest is based on the quick check, which uses size and mtime by default. If you have files in A that are identical to the ones in B except for mtime and you want to omit such files from C, you'll need to use --checksum /and/ make sure not to preserve mtimes. -- Matt
Reasonably Related Threads
- Rsync hard-links devices with different mtimes despite -t: expected?
- --prune-empty-dirs option not doing the job
- [Bug 13735] New: Synchronize files when the sending side has newer change times while modification times and sizes are identical on both sides
- rsync files with certain mtime
- Feature request: Being able specify that the destination should follow source directory structure.