Settings file times only

James Moe jimoe at sohnen-moe.com
Wed Apr 11 15:06:20 MDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/11/2012 01:53 PM, Kevin Korb wrote:
> It shouldn't care which way the time stamps are off.  --times
> (which is part of --archive) will tell rsync to correct the time
> stamps and --size-only tells rsync to assume that files of the same
> size are actually the same content.
> 
> In fact the man page entry for --size-only suggests using it for
> this situation.
> 
  Here is the result:
rsync --times --size-only --itemize-changes --dry-run \
  /media/backup05 /LocalBackup/pub-data/tmp3/ /t/tmp3/
skipping directory .

  That is it. Obviously rsync found nothing to do.
  The rsync man page indicates "--size-only" (skip files that match in
size) skips files that have the same size, ignoring the timestamp.
Almost all of the target files have the same size since all that has
changed is the timestamp, which I wish to restore on the destination.
  I also tried the "--ignore-times" option (don't skip files that
match size and time) option with no noticeable change in behavior:

 rsync --times --ignore-times --itemize-changes --dry-run \
  /media/backup05/LocalBackup/pub-data/tmp3/ /t/tmp3/
skipping directory .


> On 04/11/12 16:50, James Moe wrote:
>>> --times --size-only --itemize-changes
> 
>> That did not work. I am hoping for a way to change the times on 
>> files where the timestamp is *later* than the source timestamp.
> 

- -- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+F8kwACgkQzTcr8Prq0ZOPOACfYaEGA7OmQF27CwSVXT9HTMhc
oW0AnignIXOZtruGSmqttihW2wmHLUuE
=AeOC
-----END PGP SIGNATURE-----


More information about the rsync mailing list