Chinaunix首页 | 论坛 | 博客
  • 博客访问: 495980
  • 博文数量: 105
  • 博客积分: 3040
  • 博客等级: 中校
  • 技术积分: 1450
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-08 13:04
文章分类

全部博文(105)

文章存档

2008年(105)

我的朋友

分类: LINUX

2008-08-18 16:04:08

由于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

阅读(1606) | 评论(0) | 转发(0) |
0

上一篇:oracle权限与角色

下一篇:解决路由问题

给主人留下些什么吧!~~