linux下取得前3天前1小时前一分钟的时间(BT想法)

作者: 2hei 发表于2009年4月14日 11:04
版权声明: 可以转载, 转载时务必以超链形式标明文章原始出处和作者信息及版权声明
http://www.2hei.net/mt/2009/04/linux-date-use-get-3-days-ago.html
Linux下 取得前3天前1小时前一分钟的时间(BT想法)
date +%Y%m%d%H%M$s -d "3 days ago 1 hours ago 1 minutes ago" ;date +%Y%m%d%H%M$s
200904110904
200904141005

Freebsd中date使用
昨   天:date -v -24H "+%Y%m%d"     
上一月:date  -v  -1m  "+%Y%m" n
上一年:date  -v  -1y  "+%Y"

备忘
| | Comments (0) | TrackBacks (0)
本篇相关文章:

发表一个评论

关于这篇文章

这篇文章由2hei2009年4月14日 11:04发布.

上一篇:python 实现whois功能

下一篇:性价比超高的E63使用一周有感

回到首页 或者查看归档文章

  • Powered by FeedBurner
  • Add to Google Reader or Homepage
  • Add to My AOL
  • Subscribe in NewsGator Online
  • del.icio.us/2heidel.icio.us/2hei
  • Subscribe to feed feeds