其他分享
首页 > 其他分享> > 乱七八糟想到什么记什么8

乱七八糟想到什么记什么8

作者:互联网

常用命令

Linux时间

Linux的两种时钟

[17:39:32 root@C8[ network-scripts]#clock
2020-05-01 07:22:12.887570-04:00
[18:50:14 root@C8[ network-scripts]#date
Thu Apr 30 18:51:52 EDT 2020
[18:51:52 root@C8[ network-scripts]#clock -s
[07:24:01 root@C8[ network-scripts]#date
Fri May  1 07:24:05 EDT 2020
[07:24:05 root@C8[ network-scripts]#clock
2020-05-01 07:24:13.147018-04:00

clock,hwclock: 显示硬件时钟
-s, --hctosys 以硬件时钟为准,校正系统时钟
-w, --systohc 以系统时钟为准,校正硬件时钟

时区

用timedatectl来更改时区

[07:30:12 root@C8[ network-scripts]#date
Fri May  1 07:31:54 EDT 2020
[07:31:54 root@C8[ network-scripts]#timedatectl set-timezone Asia/Shanghai
[19:32:03 root@C8[ network-scripts]#date
Fri May  1 19:32:08 CST 2020
[19:32:08 root@C8[ network-scripts]#ll /etc/localtime
lrwxrwxrwx. 1 root root 35 May  1 19:32 /etc/localtime -> ../usr/share/zoneinfo/Asia/Shanghai

timedatectl list-timezone 列出所有时区

[19:35:59 root@C8[ network-scripts]#timedatectl list-timezones 
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg

显示日历

cal

[19:54:55 2u@u20[ /]$cal 9 1752
   September 1752     
Su Mo Tu We Th Fr Sa  
       1  2 14 15 16  
17 18 19 20 21 22 23  
24 25 26 27 28 29 30  

罗马教皇格里高利调了一下历法

标签:network,乱七八糟,想到,Africa,C8,scripts,root,什么,07
来源: https://www.cnblogs.com/bpzblog/p/12814527.html