摘要:
date +%Y%m%d -d "2 day ago"date +%Y%m%d -d "2 week ago"date +%Y%m%d -d "2 month ago"date +%Y%m%d -d "2 year ago"date -d "yesterday"昨天的命令是:yesterdayformat=`date --date='yesterday' "+%Y-%m-%d_%H:%M:%S"`echo $yesterdayformat输出格式是:2006- 阅读全文