Operating System - HP-UX
1753851 Members
9443 Online
108808 Solutions
New Discussion юеВ

Get the timestamp of a file on HP?

 
SOLVED
Go to solution
Hakki Aydin Ucar
Honored Contributor

Re: Get the timestamp of a file on HP?

>VK2COT: do not rely time stamp

Eventually -c option works to find out real time stamp:

#ls -ld /tmp/blah
-rw-r--r-- 1 root sys 0 Oct 27 2009 /tmp/blah

# ls -lc /tmp/blah
-rw-r--r-- 1 root sys 0 Sep 13 16:41 /tmp/blah
Michelle_61
Frequent Advisor

Re: Get the timestamp of a file on HP?

Thanks everybody, for the very good advice!

My real intention is to create a cache file and refresh it based on a certain timeout value.

Thanks again!
Dennis Handly
Acclaimed Contributor

Re: Get the timestamp of a file on HP?

>Hakki: What do you say VK2COT's information about time_stamp unreliability?

It's correct. But if you want to depend on it, you need to make sure the file isn't writable.
It also may be completely unrelated to what Michelle wants.

>I am totally surprised.

Isn't it obvious? :-)

>Eventually -c option works to find out real time stamp:

There are three timestamps, it depends on what you want. -c provides the inode change time, rather than the content change time.