全部博文(470)
分类:
2009-04-11 12:57:55
帮忙写个脚本, 参数是两个日期, 格式例子: rmlog 20080130 20080320
执行结果, 删除/log/下的在两个日期之间(含这两个日期)的目录. /log下的文件夹如下: drwxr-xr-x 7 root root 176 01-04 10:20 20090104 drwxr-xr-x 7 root root 176 01-05 08:36 20090105 drwxr-xr-x 6 root root 144 01-06 08:48 20090106 drwxr-xr-x 6 root root 144 01-07 19:25 20090107 drwxr-xr-x 6 root root 144 01-08 11:55 20090108 drwxr-xr-x 7 root root 176 01-12 11:16 20090112 drwxr-xr-x 6 root root 144 01-13 10:40 20090113 drwxr-xr-x 3 root root 80 01-15 15:59 20090115 drwxr-xr-x 6 root root 144 01-16 11:41 20090116 drwxr-xr-x 6 root root 144 01-18 10:30 20090118 drwxr-xr-x 7 root root 176 01-19 10:17 20090119 drwxr-xr-x 7 root root 176 01-20 08:40 20090120 drwxr-xr-x 7 root root 176 01-21 08:52 20090121 drwxr-xr-x 7 root root 176 01-22 08:24 20090122 drwxr-xr-x 7 root root 176 02-01 08:21 20090201 drwxr-xr-x 7 root root 176 02-02 00:00 20090202 drwxr-xr-x 7 root root 176 02-03 08:32 20090203 drwxr-xr-x 7 root root 176 02-04 09:31 20090204 drwxr-xr-x 2 root root 112 02-04 10:39 datacenter -rw-rw-rw- 1 root root 0 02-01 15:10 wkbserver.log 谢谢 |
您对本贴的看法: |
|
|
|
(我在学习,我要进步)
精灵使
打破水锅问到底。 CU编号: 713644 注册:2008-6-3 最后登录: 2009-04-11 帖子: 精华:0 状态:...在线... [] [] [博客] |
|