发布时间:2018-05-18作者:laosun阅读(2703)
查看当前日历:cal
cal命令用于查看当前日历,-y显示整年日历:
显示或设置时间:date
设置时间格式(需要管理员权限):
date [MMDDhhmm[[CC]YY][.ss]] +format
CC为年前两位yy为年的后两位,前两位的mm为月,后两位的mm为分钟,dd为天,hh为小时,ss为秒。如: date 010203042016.55。
显示时间格式(date ‘+%y,%m,%d,%H,%M,%S’):
format格式 | 含义 |
---|---|
%Y,%y | 年 |
%m | 月 |
%d | 日 |
%H | 时 |
%M | 分 |
%S | 秒 |
sun:~ sun$ date 2018年 5月18日 星期五 10时04分28秒 CST sun:~ sun$ date '+%Y/%m/%d' 2018/05/18 sun:~ sun$ date '+%Y-%m-%d' 2018-05-18
版权属于: 技术客
原文地址: https://www.sunjs.com/article/detail/73111b5e620c48c7b384f766b31a50b9.html
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
关键字: linux