1linux小练习1

 

1   [[email protected] ~]#date '+%F %H:%M:%S'
     2019-04-16 12:16:54

[[email protected] ~]#date  '+%Y-%m-%d %H:%M:%S'

2019-04-16 12:20:15   

[[email protected] ~]#date '+%F %X'  %T是系统时间时分秒 %X 是硬件时间的时分秒
2019-04-16 09:49:20 PM

2   [[email protected] ~]#date -d '-2 day' +%a
     Sun  或
     [[email protected] ~]#date -d '-2 day' +%A
     Sunday

3
[[email protected] ~]#date -s '2019-08-07 06:05:10' > /dev/null && date "+%Y-%m-%d %H:%M:%S"
2019-08-07 06:05:10


date -s '2019-08-07 06:05:10' 

[[email protected] ~]#date -s '2019-08-07 06:05:10'&& date '+%Y-%m-%d %H:%M:%S'
Wed Aug  7 06:05:10 CST 2019
2019-08-07 06:05:10

[[email protected] ~]#date +%s

1555444675
[[email protected] ~]#date [email protected] '+%Y-%m-%d %H:%M:%S'
2019-04-17 03:57:55
 


linux小练习1

 

1[[email protected] ~]#nano /etc/issue

\n
\t
\l

CentOS release 6.9 (Final)

Kernel \r on an \m

 

\l 是代表终端号

\n 是代表当前用户名

\d 是代表时间
[email protected] ~]#shutdown -h 18:30 'system will be halt,please ready'

Broadcast message from [email protected]
    (/dev/pts/1) at 16:04 

shutdown -c  取消关机
 

相关文章:

  • 2021-09-07
  • 2021-09-13
  • 2022-02-08
  • 2021-07-31
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-27
  • 2021-08-24
  • 2021-08-12
  • 2021-12-25
  • 2021-11-20
  • 2021-06-18
  • 2022-12-23
相关资源
相似解决方案