Re: Latest File Creation Time

Charith Perera <[email protected]> Thu, 5 Feb 2004 15:34:20 -0500
Newsgroups gmane.linux.redhat.release.valhalla
Message-ID <[email protected]>
I don't think the filesystem stores the creation time of a file. I might be 
wrong, but what you can check is the last time the file was accessed or 
modified.

stat -c %X <filename>

gives the last access time since epoch, and 

stat -c %Y <filename>

gives the last modification time since epoch, and

stat -c %Z <filename>

gives the last change time since epoch.

Hope this helps.

Charith.

On Friday 30 January 2004 11:12 pm, Mani wrote:
> I need the 'timestamp' of a file which is latest.
> I don't know how long before the file was created.
>
> even it may be last month or last year or today.
>
> On 30 Jan 2004, Anthony J Placilla wrote:
> > On Fri, 2004-01-30 at 08:04, Mani wrote:
> > > Hi
> > >    Is there any one line Linux command to find the creation time
> > > of a file in a folder which is created recently ?
> >
> > are you looking for something like
> >
> > find /tmp -mtime 1 -name "*" |xargs -l ls -l
> >
> > adjust the search dir & the mtime argument as you see fit