Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

"stat" on Tru64

Blake Roberts
Frequent Advisor

"stat" on Tru64

Ok, this is close to the "stupid question" department. However, I have a Windows 2000 box that seems to be changing the timestamp of a file back one hour when the file goes through it. The file originates on a Tru64 5.1A PK4 machine. I was asked to find the UTC time stamp of the file on the Tru64 box.

In HP-UX, the command would be "stat" to find that. However, that command does not exist, to the best of my knowledge on Tru64. How would I go about doing this?

Regards,
--Blake Roberts
3 REPLIES
Mark Grant
Honored Contributor

Re: "stat" on Tru64

Blake,

As far as I can tell there is no "stat" command on HP-UX either. There is the "stat()" standard function available within "C". I presume this is available on "Tru64" and it is a simple little program that can take advantage of it.
Never preceed any demonstration with anything more predictive than "watch this"
Ralf Puchner
Honored Contributor

Re: "stat" on Tru64

On Windows it is important to know which API was used by the program to access the files. There are some MFC functions working with environment variables (TZ). In a country with daylight saving a difference can occure if this variable will not be set properly.

In Tru64 you can use the stat() function to read the timestamp informations.
Help() { FirstReadManual(urgently); Go_to_it;; }
Blake Roberts
Frequent Advisor

Re: "stat" on Tru64

It turns out that the problem was with Windows machines connected to a Samba share. There is a known "feature" out there which occasionally causes a Windows system to report the time one hour back if it was connected over the DST transition.

The fix was to reboot the Windows box. Now everything is working right.

Both of you were correct that there is a stat() function in Tru64 which I could use in a quick program. It turns out the MS fix was all that was needed.

Regards,
--Blake