第1个回答 2017-12-26
[root@iZ259r7h4pfZ ~]# TIME=`date +'%Y-%m-%d %H:%M:00'`
[root@iZ259r7h4pfZ ~]# echo $TIME
2017-12-26 13:50:00
[root@iZ259r7h4pfZ ~]# TIME2=`date -d "-1 hour" +'hour %Y-%m-%d %H:%M:00' `
[root@iZ259r7h4pfZ ~]# echo $TIME2
hour 2017-12-26 12:51:00本回答被提问者和网友采纳