You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Change creation date of a file using terminal command touch

Hi, I'm trying to change a file's creation date ("date created") using the terminal command touch (touch -t 201904171523 filename.xxx) but it won't do that: it only changes modification date ("date modified"). I'm confident that it used to work in "High Sierra". Has anyone a clue? Thank you

MacBook Air 13", macOS 10.14

Posted on Apr 29, 2019 10:01 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 29, 2019 11:02 PM

What you have from me seems to suggest that the Unix touch command doesn't change a creation date as it is currently described. No doubt a third-party command may do the trick, but I don't know what it is.

Similar questions

4 replies

Apr 29, 2019 10:20 PM in response to rudi673

The man page for Touch does not indicate a change to the creation time:


The touch utility sets the modification and access times of files. If

any file does not exist, it is created with default permissions.


By default, touch changes both modification and access times. The -a and

-m flags may be used to select the access time or the modification time

individually. Selecting both is equivalent to the default. By default,

the timestamps are set to the current time. The -t flag explicitly spec-

ifies a different time, and the -r flag specifies to set the times those

of the specified file. The -A flag adjusts the values by a specified

amount.


Apr 29, 2019 10:43 PM in response to Kappy

Hi Kappy, if I'm not wrong (I might, though) I used a few workarounds to change modification date/time using the -mt options to the touch command and the -t option alone to change the creation date. I stumbled on a few hints here and there that helped me do that (change both creation and modification dates/times). I was just curious to find out why it doesn't seem to work out on Mojave the way it used to in Sierra and High Sierra. Thank you again.

Change creation date of a file using terminal command touch

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.