0

Linux常用命令-63:date

 1 year ago
source link: https://xugaoxiang.com/2022/06/19/linux-cmds-63-date/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

date 命令用来显示或设定系统的日期和时间。

语法格式:date [选项] [+输出形式]

常用参数:

dc2207d8079b2f29.png
# 显示当前系统时间
date

# 设置系统时间
date -s "20220320 12:00:00"

# 只设置日期
date -s 03/20/2022

# 只修改时间
date -s 12:00:00

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK