ChinaUnix.net
相关文章推荐:

linux find exec

Linux的find与exec结合,功能强大 例子: find . -name "*aa*" -exec cp -r {} destpath \; 解释:这个命令会把所有名字包含aa的文件拷贝到destpath目录下 用法: find . -name "*something*" -exec action {} somearguments \; 详细解释 find . -name "*something*" 找出所有名字包含something的文件 -exec 执行后面的命令, action 某个命令名,就是例子中的cp, {}是find的结果集合, somearguments , 命令需要的参数,就是例...

by javavsnet - Linux文档专区 - 2009-12-18 17:28:53 阅读(1419) 回复(0)

相关讨论

linux find -prune -name -wholename -regex -exec -exec command {} + ; 1.find 命令的格式 find [全局选项][要搜索的的文件夹]表达式 其中每个表达式又依由三部分组成: 局部选项(option),测试(test),命令(action).这三部分之间都用逻辑操作符(operator)与或非连接起来.操作符可以省略,这时候就用默认的"与"来连接.表达式可以多个,表达式之间也用逻辑操作符连接. 2.find 命令的执行过程 [全局选项][要搜索的的文件夹]容易理解,难...

by cleverd - Linux文档专区 - 2008-10-31 15:56:22 阅读(1866) 回复(0)

linux c 怎么用exec 调用需要管理员权限的命令 比如 shutdown find, 我现在能够实现调ls[code]#include   main()   {   execl("/bin/ls", "ls", "-al", "/etc/passwd",(char * )0);   }[/code]

execEXECLlinux

by wokaokeji2012 - Linux环境编程 - 2011-05-23 16:13:19 阅读(3737) 回复(2)

本帖最后由 jueljust 于 2012-04-12 14:00 编辑 我想在find出来的结果上执行[code]ls -l --color {}; file {}[/code]或者[code]ls -l --color {} && file {}[/code]应该怎么写 如果exec上不支持 ; && || 之類的,麻煩大家告知一下

by jueljust - Linux新手园地 - 2012-04-12 22:43:49 阅读(1358) 回复(5)

是不是等find完所有的文件再做EXEC 还是find 一个就EXEC 一个乃??

by billquick - Shell - 2004-12-14 17:06:20 阅读(1841) 回复(5)

那位高手看看,问什么我的第二个命令出现错了,怎么改呢? find ./ -name "*temp*.sql" -exec ls -alrt {} \; -rw-r--r-- 1 cius users 597 3月 22 17:15 ./temp/reward_cal_n_temp.sql find ./ -name "*temp*.sql" -exec cp *.sql ./temp1 {} \; cp: 目标"./temp/ reward_cal_n_temp.sql" 不是目录

by shanck - Shell - 2013-03-23 15:43:42 阅读(1280) 回复(3)

[oracle@RAC1 arch]$ find . -type f -mtime +5 -exec rm { } \; rm: cannot remove `{': No such file or directory rm: cannot remove `}': No such file or directory rm: cannot remove `{': No such file or directory rm: cannot remove `}': No such file or directory 和版本有关系吗?

execfind

by XQKA - Shell - 2011-07-29 11:47:58 阅读(2018) 回复(3)

找当天修改的文件和文件夹,然后删除,下面只能删除文件,怎么连不空的文件夹和子文件全部删除呢? find . -mtime -1 -exec rm {} \;

by spirit_12 - Shell - 2010-05-19 16:24:47 阅读(1222) 回复(3)

find ./ -name "2009*.bak" -exec rm -fr {} \; 执行成功,可为什么, 将 -name 内容由 “文件”改为 “目录”,如: find ./ -name "200908*" -exec rm -fr {} \; 就有错误提示,没有相应的目录,但实际目录已经删除, 请问这是为何?

by yueyegg - Shell - 2009-12-11 16:32:32 阅读(1455) 回复(7)

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/71164/showart_2095372.html

by tomoowang - Linux文档专区 - 2009-11-16 10:07:41 阅读(1156) 回复(0)

我想查找一些文件的同时,计算出文件大小.以及匹配某一条件的行数,供后续使用 find . -name "*.xml" -exec wc -c {} \; -exec grep -c '

by ghostgorst - Shell - 2009-09-21 13:20:01 阅读(3639) 回复(20)