Your email address will not be published. Save my name, email, and website in this browser for the next time I comment. Change date created For changing the creation date just use use the command touch -t followed by the date and the path of the file. SS]] : CC The first two digits of the year the century. Now use your cursor to drag this file into the file.
You will notice that a path will be automatically added to the end of the line you just typed. The entire line should look like the one given below: d: Modify the Date and Path: Open a Finder window and locate the file you wish to modify.
Drag and drop the file into the Terminal window, the file and path will be added to the end of the line you just typed. How to batch update the date modified attribute of multiple files? Could you please let me know how I can change the creation date of a file in Lion. I realise there is the touch-t command but that does not work in Lion.
A couple of people have mentioned another way, but I think they've written the solution in "coder" language rather than layman language - would someone be able to answer it in a way a layman can execute? It only changes the creation time if the target time is before the original creation time.
SetFile is part of the command line tools package which can be downloaded from developer. In Mac OS X there appears to be four different timestamps associated with a file. These timestamps are not always updated independently from each other, but one can have some individual control with a bit of care and with use of touch , SetFile , and chown or chmod.
To see this, let's experiment and create a new file from the command prompt :. The first date listed is last access time atime , the second is last modification time mtime , the third is last status change ctime , the fourth is time of file creation birth, Btime , see man lstat.
To modify modification time mtime and time of file creation Btime to a specified time use:. Apparently this also automatically updates the time of last status change ctime to the current system time!
To modify only the time of last status change ctime to the current system time use for example:. This doesn't change the ownership of the file, but accesses the file's inode and records this as a time of last status change.
Unfortunately, it is not possible to specify the time explicitly here other than by changing the computer's time In summary, to be able to change the four timestamps independently, one may use in this order for the last 3 :. The command-line touch command works in Lion, but you need a little background on how to use it. Firstly, you need to type it in, it's not a utility that operates graphically in a window. The place you type it in is an app called Terminal.
You can find this in your Utilities folder, or use Spotlight search to find it. Once you start it, you get a command line window where you can type in commands. Just because you are typing doesn't mean it has anything to do with coding, but to someone new to "old fashioned" OS commands it can look a little intimidating. So, the command is called touch , and after the command you can pass various parameters, the only required one being the filename.
Here are some simple steps to change the OS X system date from Terminal when doing a fresh install. At this point, you should now be able to continue your reinstall of OS X on your Mac, and the installation error should no longer appear. For whatever reason, the system date matters when installing the OS on your Mac. Sometimes these Macs end up sitting around for a while, and the system date gets out of whack.
Did you use this method to fix your system date?
0コメント