免费注册 查看新帖 |

Chinaunix

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

[系统管理] find命令疑问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-01-13 17:11 |只看该作者 |倒序浏览
本帖最后由 fangang001 于 2015-01-13 17:12 编辑

1.
/xxx/bb> find ./ -name "LLK*"
./log/llbtest/LLK_0991_0274_20141223_97936911.bak
./log/llbtest/LLK_0991_7650_20141223_97940095.bak
./log/llbtest/LLK_0024_8167_20150113_98698089.bak
./LLK_0732_7847_20141203_97212370
./LLK_0024_0897_20141204_97239519
./LLK_0024_0434_20141204_97240820
./LLK_0791_8828_20141204_97245704
./LLK_0991_8767_20141211_97497301
/xxx/bb> find ./ -name LLK*   #为什么会出现下面的结果
find: missing conjunction


2.对于find因为权限问题无法访问的目录如何避免
/xxx/bbb> ls
LLK_0024_0434_20141204_97240820  ULOG.080814                      bin                              etc.bk.21040905                  ll
LLK_0024_0897_20141204_97239519  ULOG.090314                      cd                               etc_bk_20141222                  log
LLK_0732_7847_20141203_97212370  ULOG.110114                      dbx                              file                             
LLK_0791_8828_20141204_97245704  ULOG.112014                      etc                                                        
LLK_0991_8767_20141211_97497301  ULOG.112614                      etc.bk.20141004                                            
/xxx/bbb> find ./ -name LLK.*   #为何直接访问的是无权限访问的目录,而不是先列出可访问的,最后给出不可访问的目录
find: cannot chdir to </xxx/bbb/etc_bk_20141222> : Permission denied
/xxx/bbb> find ./ -name "LLK*"
./log/llbtest/LLK_0991_0274_20141223_97936911.bak
./log/llbtest/LLK_0991_7650_20141223_97940095.bak
./log/llbtest/LLK_0024_8167_20150113_98698089.bak
./LLK_0732_7847_20141203_97212370
./LLK_0024_0897_20141204_97239519
./LLK_0024_0434_20141204_97240820
./LLK_0791_8828_20141204_97245704
./LLK_0991_8767_20141211_97497301
find: cannot chdir to </xxx/bbb/etc_bk_20141222> : Permission denied
/xxx/bbb>

使用-prune -perm选项好像都不能过滤这种无权访问的目录
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP