Change file creation date
Here’s how to adjust the creation or modification date of files on a Mac. The operation is completed in Terminal. Use the app located at “Applications > Utilities > Terminal”.
For example, enter the following command and press Enter to force overwrite the modification date of “file.png” on your desktop to “September 2, 2025, 11:52 PM”.
touch -t 202509022352.00 ~/Desktop/file.pngNext is the creation date. Note that changing the creation date requires the Xcode command-line tools to be installed. If they are installed, you can change it.
If it is not yet installed, enter the following command.
xcode-select --installIf you run the above code and see the following output, it is already installed.
error: command line tools are already installed, use "Software Update" to install updatesYou can also check whether it is installed correctly using the following command.
which SetFileIf the Xcode command-line tools are already installed, the following will be displayed.
/usr/bin/SetFileFinally, the command to change the “Creation Date” is as follows.
SetFile -d '09/02/2025 23:48:00' ~/Desktop/file.pngIf executed, the creation date will be overwritten to “September 2, 2025, 11:48 PM”.
By the way, you can check permissions below.
ls -l ~/Desktop | grep file.pngAccess permissions, last modified time, and approximately 5.00MB in size.
-rw-r--r--@ 1 Taro staff 5231632 9 2 23:52 file.pngPlease refer to this when adjusting file creation or modification dates.