Login  Register

Re: File creation date in a macro?

Posted by Michael Schmid on Nov 17, 2008; 10:29am
URL: http://imagej.273.s1.nabble.com/File-creation-date-in-a-macro-tp3694500p3694508.html

Hi Dscho,

the problem on Mac OSX: both "ls -lc" and "stat -f %c" don't give the  
real creation time. Editing the file (e.g. with TextEdit.app),  
appending to it and even the unix "touch" command change the date  
reported in this way.

So at least for Mac OSX 10.4, I fear that you need the macro by Curtis.

Michael
________________________________________________________________

On 15 Nov 2008, at 20:49, Johannes Schindelin wrote:

> Hi,
>
> On Sat, 15 Nov 2008, Rasband Wayne wrote:
>
>> In any case, "stat -f%c" on Mac OS X returns a cryptic 10 digit  
>> number (e.g.,
>> "1223733141") that I'm not sure how to interpret.
>
> This is the number of seconds since January 1st, 1970 (AKA "UNIX  
> epoch").
> The original poster asked for a way to sort files by their creation  
> date,
> and IMHO the UNIX epoch makes that the easiest.
>
> But of course it may be easier to execute "ls -c" then, and split the
> result by newlines.  (Although this will not work on Windows, and  
> maybe
> not even on MacOSX.)
>
> Ciao,
> Dscho