1. 当前日期
[root@Tomcat DFJR-ERP]# cur_date="`date +%Y-%m-%d`"
[root@Tomcat DFJR-ERP]# echo $cur_date
2018-06-13
2.当前日期+时间
[root@Tomcat DFJR-ERP]# cur_dateTime="`date +%Y-%m-%d,%H:%m:%s`" [root@Tomcat DFJR-ERP]# echo $cur_dateTime 2018-06-13,10:06:1528856695