Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Showing results for 
Search instead for 
Did you mean: 


Go to solution
Super Advisor


How to find the timestamp of a file

Esteemed Contributor

Re: timestamp

hello himacs,

in very simple way,
you can use ls -altr command which will list out files /directory modify in accending order

here is output example to undestand more,

-rw-r--r-- 1 root root 685 Nov 4 2003 .rhosts.cfsaved
drwxr-xr-x 2 root root 1024 Nov 4 2003 .ncftp
drwxr-xr-x 5 root root 1024 Jan 16 2004 .cpan
-rw------- 1 root root 17542 Jan 16 2004 .lsof_stang103
-rw-r--r-- 1 root root 1475 Feb 20 2004 .profile
drwxr-xr-x 4 root root 1024 Apr 17 2006 ..
-rw-r--r-- 1 root root 36 Jun 23 2006 .netrc
-rw-r--r-- 1 root root 369 Jun 23 2006
-rw-r--r-- 1 root root 740 May 17 2007 .rhosts
drwxr-xr-x 3 root root 1024 Sep 13 2007 .subversion
drwx------ 2 root root 1024 Apr 27 14:19 .ssh
drwxr-xr-x 10 root root 1024 Apr 30 17:01 .
-rwxr-x--x 1 root root 958 Apr 30 17:01
drwxrwxr-x 30 root root 1024 May 1 00:01 .hist

Dennis Handly
Acclaimed Contributor

Re: timestamp

Are you talking about in a program you want to find the time_t value?
Or in a script?
Or you want more resolution other than down to minutes?
Super Advisor

Re: timestamp

Hi Admins,

Thanks for ur reply.

Actually i want to know the timestamp of old files means last year's.while listing last year's files, it sohws only date and year no time.How to get the time ,the file created?
Trusted Contributor

Re: timestamp

I think the system lists upto 6 months prior to 11.23.

dont know if this has changed
Dennis Handly
Acclaimed Contributor

Re: timestamp

>it shows only date and year no time. How to get the time, the file created?

Does it really matter if so long ago? :-)

>Basheer: I think the system lists up to 6 months

Yes, as documented.

So other threads on how to change this: