File creation time and date
Ravi Channavajhala
ravi.channavajhala at dciera.com
Tue Aug 4 18:16:35 UTC 2009
On Tue, Aug 4, 2009 at 11:02 PM, Matthew Galgoci<mgalgoci at redhat.com> wrote:
>> Date: Tue, 4 Aug 2009 22:43:15 +0530
>> From: nitin.gizare at wipro.com
>> Reply-To: redhat-sysadmin-list at redhat.com
>> To: redhat-sysadmin-list at redhat.com
>> Subject: File creation time and date
>>
>> HI
>>
>> I have requirement to know information about creation and time of file
>> first time.
>>
>> Please help with required commands.
>>
>
> stat is probably what you want:
>
> [test at localhost ~]$ stat foo
> File: `foo'
> Size: 61 Blocks: 8 IO Block: 4096 regular file
> Device: fd00h/64768d Inode: 37421192 Links: 1
> Access: (0664/-rw-rw-r--) Uid: ( 500/test) Gid: ( 500/test)
> Access: 2009-08-04 12:49:33.000000000 -0400
> Modify: 2009-08-04 12:49:33.000000000 -0400
> Change: 2009-08-04 12:49:33.000000000 -0400
> [test at localhost ~]$
Tough luck, the ctime you are refering to in stat refers to the
attribute change time not creation time. the basic i-node structure
in any unix/linux variant doesn't have a field for creation time.
Since the file system abstraction layer VFS is fundamental to uniform
access to any file system, inode structure remains same from file
system to file system. Of course, you can engineer a file system
differently but for proper VFS functionality you still need to mess
with libc and etc....
Moral, there is no way to find this information
--
Ravi Channavajhala
CTO
DCiEra (Extreme Data Center Efficiency)
http://www.dciera.com
More information about the redhat-sysadmin-list
mailing list