在shell中我要怎么取得其一天的时间?(在线等待)

在shell中,用date可以得到当前的时间,请问我怎么得到前一天的时间呢?
---------------------------------------------------------------

  • To print the date of the day before yesterday:

date --date='2 days ago'

  • To print the date of the day three months and one day hence:
    date --date='3 months 1 day'

  • To print the day of year of Christmas in the current year:
    date --date='25 Dec' +%j

  • To print the current full month name and the day of the month:
    date '+%B %d'

Published At
Categories with 服务器类
comments powered by Disqus