in reply to Finding the absolute creation time of a file

Unfortunately, you can't get an absolute creation time of a file under Unix (not even with your command line). What your command line gets is the same as the 11th field of Perl stat, which is the inode change time. An inode contains the meta information of a file (size etc). Whenever you do something that changes the inode (e.g. add to it, so its size changes), the ctime is updated. There is no way to get the creation time of a file from the filesystem.

CU
Robartes-

  • Comment on Re: Finding the absolute creation time of a file

Replies are listed 'Best First'.
Re: Re: Finding the absolute creation time of a file
by Sihal (Pilgrim) on Apr 09, 2003 at 08:35 UTC
    <quote> What your command line gets is the same as the 11th field of Perl stat, which is the inode change time.</quote> Are you sure ? Cause when copying the files using the -p options, it preserves the timestamps, and I retain the same info as my original file, so I'm not sure that what I'm getting with my command is the ctime...
    But that's why I'm asking the question, cause I'm confused :)
      Are you sure ? Cause when copying the files using the -p options, it preserves the timestamps, and I retain the same info as my original file

      Well, it stands to reason that when you ask to preserve the timestamps, they are preserved :).

      But yes, I'm quite sure - ctime in Unix filesystem is the inode change time, not creation time. Take a look at the man page for the stat system call. Then take a look at this.

      CU
      Robartes-

        yup. ctime is inode "c"hange time .
        Excellent ressource by the way :)