From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079034715378.tru64-unix-managers.marc@archive.invalid> From: Vladas Lapinskas Date: Tue, 05 Jan 1999 15:43:01 +0000 To: tru64-unix-managers Subject: SUMMARY: Problems with New Year X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079034715378 Thank you very much to the following people who responded to my question regarding New Year problem. Bob Vickers Dave Courtade Lucio Chiappetti Michael James Bradford Choon-Pheng LIM Antonio Urbano And special thanks to Bryan Lavelle , who helped me to solve the problem. Original question: ~~~~~~~~~~~~~~~~~~ > Hello, Dear Managers! > > During the New Year holidays we have shutdowned and switched off > our Alpha 2100 servers (DU 3.2b OSF1) When we powered them on, the day was > right (January, 4th), but year was 1998 :-( Well, we manually setted the > date to 1999 (with date command, isn't it enough?), but now as a result we > have files dated December, 1999! All files dated 1998 now have date 1999!? > > Sorry for RTFM, but anyway, what should I do with date and files > from the "future"? Thank you in advance! Solution: ~~~~~~~~~ 1. Switch to single-user mode (according to manual page, date command to set the date should be applied only in single-user mode) # init s 2. Set correct date date ... 3. Update the system disk superblock mount -u / 4. Return to normal operation. PS. And of couse, I have to upgrade to 4.0d, as soon as we get it. Some suggestions: ~~~~~~~~~~~~~~~~ >From Bob Vickers If you have Perl on your system then find a Perl expert and get them to write a little script for you. Use the find command to select the files, then use the Perl functions lstat and utime. Bob ---------------------------------------------------------------------- >From Dave Courtade I have run into the same problem on other OS's when the date gets messed. I have just redated the offending files (assuming you are not concerned with file creation order) using the combination of find/touch. e.g. touch /touchtime; find / -newer /touchtime -exec touch {} \; you can play with the touch command to set the date as you wish. You can probobly even use awk or perl to extract the dates and just change the year, but that may be overkill. ------------------------------------------------------------------------ >From Michael James Bradford This is a known problem, which occurs when a machine is rebooted or is down on the 1st January, that was solved after version 3.2C. If I remember, there is a patch which can be fetched from ftp://ftp.service.digital.com/public/Digital_UNIX. To solve it, it would be best if you upgraded to version 4.0D with patches, and you can avoid problems with the year 2000 shift at the same time. ------------------------------------------------------------------------ >From Bryan Lavelle You will probably have to use the touch command to change the date on the files. That will be very time consuming. Did you use the date command from multi user mode? If so, this is probably what caused the problem, using the the date command under Digital Unix to set the time should be used only at single user as noted in the date man page (at least it is under 4.0). Bryan Yes, Bryan! You are correct and your letter helped me to solve the problem. Thank you again! --- Vladas Lapinskas, mailto:lapinskas@mail.iae.lt