sync based on filename

Fourhundred Thecat 400thecat at
Mon Aug 21 17:34:22 UTC 2023


I need to sync SRC to DST, but:

  - not based on file modification times
  - and not based on filesize

  + but on filename. Ie if this is current state, then sync:

   /SRC/2023-08-21 /DST/2023-08-19

but not if /DST contains newer directory (by name, not by modification time)

so, imagine i have this:

if /SRC/1980-01-01 has newer modification time than /DST/2023-08-21,
then rsync -r --delete /SRC /DST will overwrirte  2023-08-21 with
1980-01-01. which is not what I want.

I only need to overwrite if source is "newer" in sense of "date filename"

is this possible with rsync ?

More information about the rsync mailing list