linux date 查看系统时间与使用参数生成时间戳

网友投稿 676 2022-05-29

ECS信息

规格:2vCPUs | 4GiB | kc1.large.2

镜像:openEuler 20.03 64bit with ARM | 公共镜像

linux date 查看系统时间与使用参数生成时间戳

# date Sat Oct 2 21:53:40 CST 2021

# date "+%Y%m%d-%H%M%S" 20211002-215830

%Y year

%m month (01…12)

%d day of month (e.g., 01)

%H hour (00…23)

%M minute (00…59)

%S second (00…60)

# touch $(date "+%Y%m%d-%H%M%S").txt # ll total 0 -rw------- 1 root root 0 Oct 2 22:02 20211002-220229.txt

linux date 查看系统时间与使用参数生成时间戳

帮助文档(部分)

# date --help Usage: date [OPTION]... [+FORMAT] or: date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]] Display the current time in the given FORMAT, or set the system date. Mandatory arguments to long options are mandatory for short options too. -d, --date=STRING display time described by STRING, not 'now' --debug annotate the parsed date, and warn about questionable usage to stderr -f, --file=DATEFILE like --date; once for each line of DATEFILE -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format. ......部分截取

学习资料

弹性云服务器 ECS

openEuler-官网

openEuler-B站

openEuler-慕课

openEuler-文档

鲲鹏社区

欢迎各位同学一起来交流学习心得^_^

Linux openEuler

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:《Word/Excel/PPT 2019完全自学教程 : 视频讲解版 》 —3.3 用自选图形为文档说话
下一篇:python+requests进行get、post方法接口测试
相关文章