'Date Created' -> 'Date Modified'
August 6, 2007 9:48 PM
Subscribe
I have Mac OS X, with its Unix underpinnings. I have a number of text files through which I did a search-and-replace. Unfortunately, that altered all of the timestamps on the files. I'm trying to restore things via the "Date Created" info.
But my Google-fu is experiencing massive failure, perhaps due to the wrong terms. Can this be done via "touch", or is the "date created" info not accessible via the shell script? Is it AppleScriptable?
I'm sure someone's already had to do this and put it up on the Web somewhere — I just can't find the puppy.
(Also, hoping that the solution is one that can be applied to multiple files in a batch situation.)
Thanks, everyone.
posted by WCityMike to computers & internet (12 comments total)
2 users marked this as a favorite
You want -t on OS X, -d on linux.
$ for i in * ; do touch -t [timestring] $i;done
posted by b1tr0t at 10:03 PM on August 6, 2007