请问下这个查找语句中的o是什么意思 find /usr/sam -path "/usr/sam/dir1" -prune -o -print
by oracleoneone - Linux新手园地 - 2011-11-12 14:33:46 阅读(1524) 回复(1)
find . \( -path .*/Input -o -path .*/Output -o -path .*/Current \) -prune -o -name "*.htm" -print 像这样的find 不期望的是跳过Input,Output, Current的目录进行检索 但是 正则不起作用 请问 怎么弄
find . -name "/data26/billold/chenyj/log/count_sms_later.log" -prune -o -print . ./count_sms_later.log ./count_sms_later.log/abc ./count_sms_later.log/abc/ccd ./count_sms_later.log.070914 ./count_sms_later.log.070918 ./count_sms_later.log.070928 我用了-prune 应该不会出现./count_sms_later.log/abc ./count_sms_later.log/abc/ccd 小菜鸟求教啊
find . -name \"/data26/billold/chenyj/log/count_sms_later.log\" -prune -o -print . ./count_sms_later.log ./count_sms_later.log/abc ./count_sms_later.log/abc/ccd ./count_sms_later.log.070914 ./count_sms_later.log.070918 ./count_sms_later.log.070928 我用了-prune 应该不会出现./count_sms_later.log/abc ./count_sms_later.log/abc/ccd 小菜鸟求教啊
-prune If the current entry is a directory, cause find to skip that directory. This can be useful to avoid walking certain directories, or to avoid recursive loops when using cpio -p. Note, however, that -prune is useless if ...
问大家一个find的低级问题,我以前遇到这个问题到现在也没解决。 我想查找/目录下的所有目录,但不包括/proc如何做到 ? find / -type d -path "/proc" -prune -o -print 结果并不是我想的那样 我系统为rh9,kernel2.6.12
[code][root@vhost1 a]# ls -R . .: a b ./b: a [root@vhost1 a]# find . -path './b' -prune -o -type f ./b ./a [root@vhost1 a]# find . -path './b' -prune ./b[/code]能否利用短路方式给分解一下,讲讲执行过程,谢谢,实在是糊涂了
目录结构 ./templates/ ./templates/Makefile ./templates/Makefile.mk ./test ./test/Makefile ./test/...... //other files 1. # find . -path "./test" -prune -o -print 这个是对的 输出结果: ./templates/Makefile ./templates/Makefile.mk 2. # find . -name "Makefile" -path "./test" -prune -o -print 这个为什么显示所有的文件呢??? 输出结果: ./templates/Makefil...
想要查询/root/xz下除了/root/xz/xz2目录下的所有.txt文档 find /root/xz -name "*.txt" -path "/root/xz/xz2" -prune -o -print 上述命令哪里错了?