how to get creation date/time of o file in aix4.3.3

how to get creation date/time of o file in aix4.3.3

Post by kn?kman » Sat, 08 Feb 2003 19:41:02



Hi
Is it possible to get the creation date/time of a file in aix4.3.3
file is change several times since then, so date in "ls -l" shows date of
latest use

TIA
kn?kmans

 
 
 

how to get creation date/time of o file in aix4.3.3

Post by Hubert Quarantel-Colomban » Sat, 08 Feb 2003 19:44:31



> Hi
> Is it possible to get the creation date/time of a file in aix4.3.3
> file is change several times since then, so date in "ls -l" shows date of
> latest use

> TIA
> kn?kmans

Hello,

Creation date/time of file is _never_ stored on any Unix.

The only timestamps stored are:
        - mtime: date of last modification,
        - atime: date of last access,
        - and ctime: date of last change on the i-node.

sorry, but there is no possibility for you to get creation timestamp...

Hubert.

 
 
 

how to get creation date/time of o file in aix4.3.3

Post by Dale Talco » Sat, 08 Feb 2003 18:30:48




>> Is it possible to get the creation date/time of a file in aix4.3.3
>Creation date/time of file is _never_ stored on any Unix.

Not quite true any more.  Mac OS X is Unix based, but supports a file system
that records file creation time in addition to the usual Unix timestamps.

However, that doesn't help on AIX.

--
Dale Talcott, IT Research Computing Services, Purdue University

 
 
 

how to get creation date/time of o file in aix4.3.3

Post by Dale Talco » Mon, 10 Feb 2003 21:11:10




>>Not quite true any more.  Mac OS X is Unix based, but supports a file system
>>that records file creation time in addition to the usual Unix timestamps.
>>However, that doesn't help on AIX.
>Does Mac OS X's filesystem use a (read-only) extended attribute (a la BeFS),
>or is the creation time part of the filesystem's built-in inode structure?

The on-disk equivalent of an inode has the creation time as part of its
primary information.  The following is from the structure for a catalog
entry:

    ...
    UInt32              createDate;
    UInt32              contentModDate;
    UInt32              attributeModDate;
    UInt32              accessDate;
    UInt32              backupDate;
    ...

So, creation time is on a par with access and mod times.

However, the in-memory vnode structure has only the three traditional
timestampes.  You must use a special API to read/write the additional
info in the catalog entries.

--
Dale Talcott, IT Research Computing Services, Purdue University