shell date time

In Bash:

get year-month-day from date

DATE=`date +%Y-%m-%d`
get year-month-day hour:minute:second from date

DATE=`date '+%Y-%m-%d %H:%M:%S'`

posted @ 2017-10-09 17:22  kakaisgood  阅读(335)  评论(0编辑  收藏  举报