# Strange file modification time on a Mac

**URL:** <https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095>\
**Category:** Factual Questions\
**Created:** [October 9, 2015, 10:53pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095 "2015-10-09T22:53:17Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![TSBG](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TSBG](https://boards.straightdope.com/u/TSBG)\
**Post date:** [October 9, 2015, 10:53pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/1 "2015-10-09T22:53:17Z")

</div>

I just moved some files from my desktop to a laptop via a thumb drive. The copy that arrived on my laptop showed the most recently modified item as a folder containing some documents and a PDF. The documents/PDF show the correct modification dates (weeks ago), it’s only the folder containing those files that shows as being modified today (at the same time as I transferred the whole big batch of files). No other documents, images, PDFs, or folders were affected.

Problem or just annoying glitch?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 9, 2015, 11:09pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/2 "2015-10-09T23:09:34Z")

</div>

But the ‘…’ link in the folder _was_ modified! (I think even Windows folders have ‘…’ links; surely Macs do.)

---

<div class="post-metadata">

**Author:** ![TSBG](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TSBG](https://boards.straightdope.com/u/TSBG)\
**Post date:** [October 9, 2015, 11:18pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/3 "2015-10-09T23:18:45Z")

</div>

I don’t know what that means.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 9, 2015, 11:31pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/4 "2015-10-09T23:31:26Z")

</div>

Open _Command Prompt_ and type _Dir_. Do you see an entry in the folder named _ **…** _ ?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 9, 2015, 11:38pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/5 "2015-10-09T23:38:49Z")

</div>

> [@septimus](#):
>
> Open _Command Prompt_ and type _Dir_. Do you see an entry in the folder named _ **…** _ ?

:smack: - I forgot that you were on Mac. But the principle is the same; I’m just not sure how to spell Command Prompt or Dir in Mac talk.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [October 10, 2015, 12:52am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/6 "2015-10-10T00:52:10Z")

</div>

> [@septimus](#):
>
> :smack: - I forgot that you were on Mac. But the principle is the same; I’m just not sure how to spell Command Prompt or Dir in Mac talk.

/Applications/Utilities/Terminal

ls

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [October 10, 2015, 1:55am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/7 "2015-10-10T01:55:58Z")

</div>

> [@TSBG](#):
>
> I don’t know what that means.

The link in the current directory to take you to the parent directory.

For example, from /foo/bar, the … link takes you to /foo.

All Macs running MacOS X have this concept.

---

<div class="post-metadata">

**Author:** ![Kenm](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@Kenm](https://boards.straightdope.com/u/Kenm)\
**Post date:** [October 10, 2015, 5:52am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/8 "2015-10-10T05:52:01Z")

</div>

> [@Derleth](#):
>
> The link in the current directory to take you to the parent directory.
> 
> For example, from /foo/bar, the … link takes you to /foo.
> 
> All Macs running MacOS X have this concept.

I don’t think it’ll help. If a folder is copied to another drive, the hierarchy of the folder that was copied will end at the drive name (as would the original’s).

Open the folder and move the screen pointer to the folder’s title and hold the mouse button down while holding down the Command key.

The folder’s place in the hierarchy’s pecking order is displayed, but that would do little to explain why that folder’s modification date changed.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 10, 2015, 6:26am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/9 "2015-10-10T06:26:24Z")

</div>

> [@Kenm](#):
>
> … but that would do little to explain why that folder’s modification date changed.

😕 I thought this was solved in #2 upthread. If the … entry is modified, by definition the folder is modified.

---

<div class="post-metadata">

**Author:** ![Kenm](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@Kenm](https://boards.straightdope.com/u/Kenm)\
**Post date:** [October 10, 2015, 5:02pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/10 "2015-10-10T17:02:37Z")

</div>

I’m unclear as to what those commands on a Windows machine would do, other than display a pathway. Would they reveal when the folder was modified? Does a folder copied to a flash drive retain a link to the original?

The syntax would make sense to a Windows user, but it’s all Greek to me and to TSBG. The Mac terminal runs on Unix commands, but it doesn’t need the terminal to display a pathway. There are at least two other ways to do that.

Just now I created a folder on my desktop machine. I named it Ruins Pic Inside. I dropped a photo of a collapsing wooden building into it to give it content. The folder pathway: Hard Drive/Users/Kenm/Desktop/Ruins Pic Inside

I dragged the folder to a flash drive where it copied (dragging a folder or file to another drive doesn’t move it; it’s copied). The folder pathway on the flash drive: Flash Drive/Ruins Pic Inside

There’s no information as to where the folder Ruins Pic Inside came from, and the modification date of the folder did not change.

I deleted the desktop version of that folder, then copied the flash-drive version back to the iMac desktop. The folder’s pathway is identical to the original’s and the modification date did not change.

So it appears that the reason for the modification-date change made to TSBG’s folder remains a mystery.

---

<div class="post-metadata">

**Author:** ![zbuzz](https://avatars.discourse-cdn.com/v4/letter/z/e19b73/32.png) [@zbuzz](https://boards.straightdope.com/u/zbuzz)\
**Post date:** [October 10, 2015, 9:14pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/11 "2015-10-10T21:14:22Z")

</div>

It’s possible you had some bogus time and date settings previously when it was last modified and the act of copying sort of reset the modified date.

Could you have added or removed something in the folder and just don’t remember you did so?

Can you copy the folder again and tell us if the same thing happens?

---

<div class="post-metadata">

**Author:** ![buckgully](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@buckgully](https://boards.straightdope.com/u/buckgully)\
**Post date:** [October 10, 2015, 10:03pm UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/12 "2015-10-10T22:03:27Z")

</div>

The Mac filesystem has some normally hidden files that get modified when you do things like rearrange icons or change other finder settings for that folder: [.DS\_Store](https://en.wikipedia.org/wiki/.DS_Store)

Even though by default you can’t see those files, they’ll still change their parent folder’s modified date when they get changed.

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [October 11, 2015, 4:32am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/13 "2015-10-11T04:32:13Z")

</div>

If an ordinary file on a Mac is modified it won’t cause a change to the parent directory (containing folder).

The Mac filesystem is a curious beast. In many ways it looks like a Unix filesystem, and it presents that interface via the command line utilities that any Unix user would be used to. Underneath it still preserves some of the old style Mac HFS features, and these can complicate matters. But for the OP’s question that won’t matter.

Directories give files their names. Unix files don’t have names by themselves, they are referenced by name/file-reference pairs in directories. A file can have multiple such references, and they are all equal in standing. When the last one goes away the file vanishes. That name-reference pair is all that is in a directory. But directories always contain a reference to their parent directory. This, by convention has the name **…** Directories also contain a reference to themselves, by convention this has the name “ **.** ”

If you move a directory from one part of the file system to another, you will need to change the reference to it’s parent directory (the one called …) So the directory is modified.

If the directory is a copy of one from another device (and thus not simply moved within a filesystem) it will be copied. The order of events may dictate exactly what happens, but in order to create the correct reference back to the directory’s parent, logically the … entry must be modified, and thus the directory is modified.

The OP didn’t say if the creation date was as expected, and only the modification date that was changed.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 11, 2015, 5:45am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/14 "2015-10-11T05:45:57Z")

</div>

**Francis Vaughan** did a great job of explaining why a folder’s modification time _should_ change when it’s moved. On older versions of Unix one would, similarly, see the modification time change.

However, even old versions of Unix have a system call to overwrite the modification time; this is useful with a command like _cp -p_ – copy while preserving timestamps. And the Linux _mv_ and _cp_ utilities do indeed deliberately preserve the old modification timestamp. Judging by **Kenm** ’s response, so does Mac. This makes me think **buckgully** has the right answer.

From the Trivia Desk:  
With Unix/Linux there are three timestamps associated with each file or folder: time of last _access_, time of last _modification_, time of last _change_. Unlike Windows, there is no time of _creation_. The change timestamp, which is set whenever the modification timestamp is set, may seem redundant, but the change time is changed in certain circumstances when the modification time is not changed (e.g. when permissions are changed).  
Moreover, while there are system calls to set access and modification times to any programmer-specified value (i.e. to tell a lie! 🆒 ), _there is no system call to set the change time_. (You can do it if you wish: just write to the raw disk device!)

In Unix you can see the _change time_ with a command like _ls -cltd_ .

> [@Francis\_Vaughan](#):
>
> The OP didn’t say if the creation date was as expected, and only the modification date that was changed.

So Mac’s have creation timestamps. Do they also have change timestamps?

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [October 11, 2015, 11:24am UTC](https://boards.straightdope.com/t/strange-file-modification-time-on-a-mac/734095/15 "2015-10-11T11:24:05Z")

</div>

> [@septimus](#):
>
> So Mac’s have creation timestamps. Do they also have change timestamps?

Yes.  
ls -lc for status change (so ctime),  
ls -l for modification (so mtime) (-t to sort with mtime)  
ls -lu for access time,  
and confusingly, ls -lU for creation time. (When -U usually means unsorted.)

The file system is rather different under the hood, and there was once a remarkably clear and well thought out design paper from Apple discussing the issues of mapping Unix and Mac file system semantics. For some things you simply can’t do it. Like case sensitivity.
