0

I am syncing files between macOS and a remote Ubuntu server.

On Ubuntu, the date of last modification of a directory doesn't change when I store, modify or delete a file inside this directory. This behavior makes sense to me, because it's the directory's content, not the directory itself, that has changed.

On macOS this behavior is different (and seems irrational to me): Although the directory itself stays unchanged, its "last modified" date gets changed every time when something inside this directory gets changed.

So, when I create a directory on macOS and sync it to Ubuntu, everything is fine: both have the same date. But when I move files in one of the directories, and sync those files, the directories date on Ubuntu keeps its old value, but the date on the corresponding directory on macOS will be changed, and then, because of this different date, my sync-programm shows differences where in fact no differences are.

Is there a setting in macOS, that induces my iMac's directories to behave like their counterparts on Ubuntu?

9
  • 1
    I don't have an answer but just a comment. Ubuntu is the one with the broken behavior here. If you modify the contents of a file in a directory on MacOS (or anywhere), I'd not expect the timestamp on the directory to change, within limits. But if you add or remove entries in the directory, I would certainly expect the modify timestamp of the directory to change, because you HAVE modified it. Oct 23, 2017 at 17:39
  • Additional comment to Marc's one: both folder date behaviors are plausible and have pros and cons. With a sync app working properly it shouldn't make any difference though.
    – klanomath
    Oct 23, 2017 at 18:10
  • @MarcWilson well if you renamed a directory would that be modifying it?
    – barlop
    May 3, 2020 at 8:37
  • @klanomath why? is it because you think a sync app should ignore the timestamp of directories and only go by the timestamp of files that aren't directories?
    – barlop
    May 3, 2020 at 8:38
  • 1
    @barlop If the changed "last modified" date of a folder doesn't trigger the sync app to transfer the whole content (because nothing has changed really - e.g. after moving a folder/file out and in again), but change the "last modified" date and the metadata of the folder itself, then it's no problem.
    – klanomath
    May 3, 2020 at 11:25

0

You must log in to answer this question.

Browse other questions tagged .