linux shell convert timestamp to date
$ date --date='1447897489'
2015年 11月 19日 星期四 09:44:49 CST
-----------------------------------------------------------------
$ date -d now +%Y%m%d
20151126 #(2015年11月26日)
%M 表示分钟
%D 11/26/15 #(2015年11月26日)
$ date --date='1447897489'
2015年 11月 19日 星期四 09:44:49 CST
-----------------------------------------------------------------
$ date -d now +%Y%m%d
20151126 #(2015年11月26日)
%M 表示分钟
%D 11/26/15 #(2015年11月26日)
本文介绍了如何使用 Linux shell 脚本将时间戳转换为日期格式,提供了具体示例并解释了常用日期格式符号的意义。
482

被折叠的 条评论
为什么被折叠?



