zoukankan      html  css  js  c++  java
  • date

    显示时间
    date +%Y%m%d' '%H:%M:%S

    安装时间同步应用
    yum install ntp

    执行时间同步

    ntpdate cn.pool.ntp.org 

    设定时间
    1 date -s //设置当前时间,只有root权限才能设置,其他只能查看。
    2 date -s 20080523 //设置成20080523,这样会把具体时间设置成空00:00:00
    3 date -s 01:01:01 //设置具体时间,不会对日期做更改
    4 date -s "01:01:01 2008-05-23" //这样可以设置全部时间
    5 date -s "01:01:01 20080523" //这样可以设置全部时间
    6 date -s "2008-05-23 01:01:01" //这样可以设置全部时间
    7 date -s "20080523 01:01:01" //这样可以设置全部时间
    8 hwclock -s Set the System Time from the Hardware Clock.
    9 hwclock -w Set the Hardware Clock to the current System Time.



  • 相关阅读:
    shell:bash基本特性
    python_day02
    python_day01
    centos环境下安装python3以及pip3
    http1到http3的巨大变化
    HTTP协议
    bootstrap
    JQuery
    BOM与DOM
    23种设计模式的几种常见的设计模式
  • 原文地址:https://www.cnblogs.com/xiluhua/p/5541426.html
Copyright © 2011-2022 走看看