Ntpdate and hwclock commands

Source: Internet
Author: User

The ntpdate and hwclock commands use the ntpdate command to obtain the network time and use it as the hardware time: www.2cto.com/usr/sbin/ntpdate servername/ip &/sbin/hwclock -- systohc>/dev/null 2> & 1 Example: /usr/sbin/ntpdate tw.pool.ntp.org &/sbin/hwclock -- systohc>/dev/null 2> & 1 General servername: worker manually set the system time: date-s "time date" date-s "12:30:00 20130204" manually set the hardware time: www.2cto.com hwclock -- set -- Date = "month/day/year hour: minute: Second" (Common Format) hwclock -- set -- date = "2013/02/05 12:30:00" ---> you can use hwclock -- set -- date = "20130205 12:30:00" ----> to use crontab together with crontab. the time is based on the system time!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.