免费注册 查看新帖 |

Chinaunix

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

请问exec里的\和+有什么区别 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-04 21:50 |只看该作者 |倒序浏览
一个是-exec xxxx {} \;
一个是-exec xxxx {} +;
两者有什么区别。

论坛徽章:
0
2 [报告]
发表于 2009-04-04 21:54 |只看该作者
-exec xxxx {} +;什么里的?

论坛徽章:
0
3 [报告]
发表于 2009-04-04 23:21 |只看该作者
比如说find / xxxxx -exec xxxx {} \和{} +有何区别。

论坛徽章:
0
4 [报告]
发表于 2009-04-04 23:33 |只看该作者
\只是防止shell解释; 因为第1次command split会看到;
+没怎么用,不知道是不是指这个
-exec command {} +
              This  variant  of the -exec option runs the specified command on
              the selected files, but the command line is built  by  appending
              each  selected file name at the end; the total number of invoca-
              tions of the command will  be  much  less  than  the  number  of
              matched  files.   The command line is built in much the same way
              that xargs builds its command lines.  Only one instance of  '{}'
              is  allowed  within the command.  The command is executed in the
              starting directory.

论坛徽章:
0
5 [报告]
发表于 2009-04-04 23:50 |只看该作者
你从哪man到的???

论坛徽章:
0
6 [报告]
发表于 2009-04-04 23:51 |只看该作者
man find

论坛徽章:
0
7 [报告]
发表于 2009-04-05 09:32 |只看该作者

回复 #4 justlooks 的帖子

学习了,第一次看到

论坛徽章:
0
8 [报告]
发表于 2009-04-05 09:37 |只看该作者

回复 #4 justlooks 的帖子

学习,还以为是其它,原来也是find啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP