In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to use the clock command in Linux, the article is very detailed, has a certain reference value, interested friends must read it!
The Linux common command clock is used to adjust the RTC time. RTC is the built-in hardware time of the computer. Executing this instruction can display the present time, adjust the time of the hardware clock, set the system time to the same time as the hardware clock, or save the system time back to the hardware clock.
Clock is used to adjust RTC time
Syntax clock [--adjust] [--debug] [--directisa] [--getepoch] [--hctosys] [--set-- date= ""] [--setepoch-- epoch=] [--show] [--systohc] [--test] [--utc] [--version] option-the first time adjust uses the "--set" or "--systohc" parameters to set the hardware clock, it produces a file named adjtime in the / etc directory. When you use these two parameters to adjust the hardware clock again, this file will record the difference between the two adjustments. When you execute the clock instruction plus the "--adjust" parameter in the future, the program will automatically calculate the average value according to the numerical difference of the record file, and automatically adjust the time of the hardware clock. -- debug shows the instruction execution process in detail, which is convenient for troubleshooting or understanding the program execution situation. Directisa tells clock to access the hardware clock directly without going through the / dev/rtc device file. This parameter applies to older computers with only ISA bus structures. Getepoch presents the new era value of the hardware clock in the core of the system to the standard output device. Hctosys Hardware Clock to System Time, set the system time to be consistent with the hardware clock. Since this action will cause the system to fully update the access time of the file, it is best to execute it when the system starts. -- set--date sets the date and time of the hardware clock. -- setepoch--epoch= sets the new era value of the hardware clock of the system core, and the year is represented by four-digit tree words. Show reads the time of the hardware clock and renders it to the standard output device. Systohc System Time to Hardware Clock, save the system time back to the hardware clock. Test only tests and does not actually write time to the hardware clock or system time. Utc refers to the time on the hardware clock as CUT, sometimes called UTC or UCT. -- version displays version information. Instance to get the current time
Clock # get the current time display UTC time
Clock-utc # shows that the above UTC time is all the content of the article "how to use clock commands in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.