免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5439 | 回复: 2
打印 上一主题 下一主题

求教AIXfind命令问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-28 13:52 |只看该作者 |倒序浏览
我有这样一行命令:\r\nfind /svldap03_dbbackup/tambkonline1/ -type f -name tambkonline1\\* -mtime +7 -exec rm -r  {} \\; >>$log 2>&1\r\n\r\n前面一截find /svldap03_dbbackup/tambkonline1/ -type f -name tambkonline1\\* -mtime +7 意思是查找到7天前的文件\r\n后面一截-exec rm -r  {} \\; 意思删除这些文件。\r\nok,这个是成功的。\r\n\r\n但是,我现在想查找到几天前的目录,再删除就不行了。我的命令是这样写的\r\nsvwpst02:# find /tivoli.image/ -type d -name timbk\\* -mtime +0            \r\n/tivoli.image/timbk080318141400\r\n发现前面一截,查找,是找到了。\r\n但是我加上后面一截,删除的时候就发现不行了。如下:\r\nsvwpst02:# find /tivoli.image/ -type d -name timbk\\* -mtime +0 -exec rm -r {} \\;    \r\nfind: 0652-081 cannot change directory to </tivoli.image/timbk080318141400>:\r\n  : A file or directory in the path name does not exist.\r\n\r\n哪位大哥帮帮我\n\n[ 本帖最后由 heidou 于 2008-3-28 14:02 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-03-28 14:03 |只看该作者

回复 #2 jinl 的帖子

svwpst02:# find /tivoli.image/ -type d -name timbk\\* -mtime +0 -exec rm -r {} \\;    \r\nfind: 0652-081 cannot change directory to </tivoli.image/timbk080318141400>:\r\n  : A file or directory in the path name does not exist.\r\n刚才没注意加,现在加上,这样

论坛徽章:
0
3 [报告]
发表于 2008-03-28 14:13 |只看该作者

回复 #3 heidou 的帖子

svwpst02:# find /tivoli.image/ -type d -name timbk\\* -mtime +0 -exec rm -r {} \\;    \r\nfind: 0652-081 cannot change directory to </tivoli.image/timbk080318141400>:\r\n  : A file or directory in the path name does not exist.\r\n\r\n发现目录照样是删除掉了,但是为什么报错?\r\nfind: 0652-081 cannot change directory to </tivoli.image/timbk080318141400>:\r\n  : A file or directory in the path name does not exist.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP