On Tue, 04 Jul 2000, Linux Maillist user wrote about, Re: Setting date and time:
> On Mon, 3 Jul 2000, Michael H. Warfield wrote:
>
> > On Tue, Jul 04, 2000 at 01:25:31PM +0200, Linux Maillist user wrote:
> >
> > RedHat:
> >
> > /sbin/clock -w
> >
> > (Writes the current date and time to the CMOS)
>
> There must be a way with the 'date' command. That's the way
> I wanted to do it. Anyway, I do not have ntpdate.
I think you are getting things mixed up a little, one can use programs like;
rdate
netdate
To syncronise your system with a time server on the internet, as in.
rdate -s <remote-host-name>
netdate <remote-host-name>
One then uses the clock program to write the system time to the CMOS clock.
clock -w
A simple script run via cron once a day will keep your time in sync with
the rest of the world.
#!/bin/sh
# I am called rc.time, place me in /etc/rc.d
rdate -s <remote-host-name>
clock -w
# thats it.
Edit your crontab (root is normally the only one allowd to alter the clocks)
So edit roots crontab to find /etc/rc.d/rc.time and away you go.
>
> --Jesse
--
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs