Thank you very much to the following people who responded to my
question regarding New Year problem.
Bob Vickers <bobv_at_dcs.rhbnc.ac.uk>
Dave Courtade <drc_at_amherst.com>
Lucio Chiappetti <lucio_at_ifctr.mi.cnr.it>
Michael James Bradford <mjbr_at_tdk.dk>
Choon-Pheng LIM <choonpheng_at_tdb.gov.sg>
Antonio Urbano <a.urbano_at_mailcity.com>
And special thanks to Bryan Lavelle <Bryan.Lavelle_at_digital.com>, 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 <Bryan.Lavelle_at_digital.com>
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_at_mail.iae.lt
Received on Tue Jan 05 1999 - 15:43:51 NZDT