Linux命令参考
latest
归档备份和压缩
日期与时间
cal
date
简介
选项
示例
hwclock
磁盘和文件系统
文件和目录
内核
网络
包管理
Linux命令参考
Docs
»
日期与时间
»
date
Edit on GitHub
date
¶
简介
¶
打印或者设置系统时间
选项
¶
-d 通过字符串来描述时间
-f 从文件中读取字符串来描述时间
-r 打印文件的最后修改时间
-R 以rfc2822规范来显示时间
–rfc-3339 以rfc3339来显示,可用date,seconds和ns
-s 设置时间
-u 打印utc时间
+format 格式化时间,常用的有%D,%F,%n,%s
示例
¶
显示时间戳:
date
+%
s
显示标准日期格式:
date
+%
F
Read the Docs
v: latest
Versions
latest
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.