Chinaunix首页 | 论坛 | 博客
  • 博客访问: 617704
  • 博文数量: 184
  • 博客积分: 10057
  • 博客等级: 上将
  • 技术积分: 2505
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-31 16:34
文章分类

全部博文(184)

文章存档

2010年(5)

2009年(104)

2008年(75)

我的朋友

分类: LINUX

2008-08-19 01:42:43

由于Linux对man date -d 参数说的比较模糊,故举例如下:
# -d, --date=STRING  display time described by STRING, not `now'
For Linux
[root@Gman root]# date -d next-day +%Y%m%d
20060328
[root@Gman root]# date -d last-day +%Y%m%d
20060326
[root@Gman root]# date -d yesterday +%Y%m%d
20060326
[root@Gman root]# date -d tomorrow +%Y%m%d
20060328
[root@Gman root]# date -d last-month +%Y%m
200602
[root@Gman root]# date -d next-month +%Y%m
200604
[root@Gman root]# date -d next-year +%Y
2007
阅读(443) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~