In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What is the method of viewing and modifying time in linux environment? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
1. View date and time
Date
2. View the time zone
Date-R
3. View UTC time
Date-u
4. Modification date
[root@centos ~] # date-s 20181230 / * is displayed as: Sun Dec 30 00:00:00 EST 2018 * /
Modify the format as: year, month, day
Note: after the modification, the time will become 0: 00.
5. Modification time
[root@centos ~] # date-s 0815 / * is displayed as: Sun Dec 30 08:15:00 EST 2018 * /
Modify the format to: hours, minutes
6. Date and time of modification
[root@centos ~] # date 1230081518 / * is displayed as: Sun Dec 3008: 15:00 EST 2018 * /
Modify the format as: month, day, hour, minute, year
7. When entering two digits, the default is the 21st century, or you can enter a complete year.
[root@centos ~] # date 123008152018 / * is displayed as: Sun Dec 3008: 15:00 EST 2018 * /
8. You can also ignore the year
[root@centos ~] # date 1230081520 / * is displayed as: Sun Dec 3008: 15:00 EST 2018 * /
9. If you need to modify the seconds, you can add it to the end and divide it with points.
[root@centos ~] # date 123008152018.20 / * is displayed as: Sun Dec 3008: 15:20 EST 2018 * /
10. Check the hardware time
[root@centos ~] # hwclock / * is displayed as: Thu 11 Oct 2018 09:32:03 PM EDT-1.047765 seconds * /
Hardware time synchronization to the system
Hwclock-hctosys
12. System time synchronization to hardware
Hwclock-systohc Thank you for your reading! After reading the above, do you have a general idea of how to view and modify time in the linux environment? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are 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.