File creation time and date

Ben Kevan ben.kevan at gmail.com
Tue Aug 4 17:46:44 UTC 2009


On Tue, 04 Aug 2009 10:34:29 -0700, <nitin.gizare at wipro.com> wrote:

> HI
>
> Thanks I will check with stat command.
>
> Rgds
> Nitin
>
> -----Original Message-----
> From: redhat-sysadmin-list-bounces at redhat.com
> [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Matthew
> Galgoci
> Sent: Tuesday, August 04, 2009 11:02 PM
> To: redhat-sysadmin-list at redhat.com
> Subject: Re: File creation time and date
>
>> 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 ~]$
>


by default EXT2/3 and Reiser do not hold the creation time, but only the  
last modified time.. so if the file has been modified you'll not find the  
created time..

this however should be availble in EXT4 (or at least that's what I recall)


-- 
If you don't know what you want, you end up with a lot you don't.  -Fight  
Club




More information about the redhat-sysadmin-list mailing list