1748169 Members
4079 Online
108758 Solutions
New Discussion юеВ

timestamp

 
SOLVED
Go to solution
himacs
Super Advisor

timestamp

How to find the timestamp of a file



Regards,
himacs
5 REPLIES 5
avizen9
Esteemed Contributor
Solution

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 a.sh
-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 system.perf.sh
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?
himacs
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?
Basheer_2
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:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1320053
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1279941
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1207493