timestamp to date [ 及date 相关的 命令]

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日)

猜你喜欢

转载自jacklin2015.iteye.com/blog/2259349