ChinaUnix.net
相关文章推荐:

prune

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 小菜鸟求教啊

by amcyj - HP-UX - 2008-05-18 22:51:14 阅读(1867) 回复(4)

相关讨论

-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 ...

by kenancola - Shell - 2007-09-21 08:46:35 阅读(2068) 回复(5)

请问如果希望在使用find命令去搜索一个目录(如目录/tmp)时,不去搜索该目录下的特定的子目录(如/tmp/test)

by tombola - Solaris - 2006-09-10 07:15:20 阅读(859) 回复(1)

问大家一个find的低级问题,我以前遇到这个问题到现在也没解决。 我想查找/目录下的所有目录,但不包括/proc如何做到 ? find / -type d -path "/proc" -prune -o -print 结果并不是我想的那样 我系统为rh9,kernel2.6.12

by sting0z - Shell - 2005-08-15 13:26:21 阅读(5714) 回复(6)

想要查询/root/xz下除了/root/xz/xz2目录下的所有.txt文档 find /root/xz -name "*.txt" -path "/root/xz/xz2" -prune -o -print 上述命令哪里错了?

by 落音 - Shell - 2009-06-19 23:42:09 阅读(1902) 回复(5)

把小于1000k的文件打包,但排除 tmp目录。试用了下面很多种方法,还是不行。总是把tmp目录下的文件打进去。那位前辈帮忙看下,那出的问题。谢了 solaris 8 [code] find . -name tmp -prune -o -size -1000k -exec tar rvf a.tar {} \; find . \( -name tmp -prune -o -size -1000k \) -exec tar rvf a.tar {} \; find . \( -name tmp -prune \) -o -size -1000k -exec tar rvf a.tar {} \; find . -name tmp -prune -o -size -100...

by ddb521 - Shell - 2009-05-19 21:31:21 阅读(1660) 回复(7)

把小于1000k的文件打包,但排除 tmp目录。试用了下面很多种方法,还是不行。总是把tmp目录下的文件打进去。那位前辈帮忙看下,那出的问题。谢了 [code] find . -name tmp -prune -o -size -1000k -exec tar rvf a.tar {} \; find . \( -name tmp -prune -o -size -1000k \) -exec tar rvf a.tar {} \; find . \( -name tmp -prune \) -o -size -1000k -exec tar rvf a.tar {} \; find . -name tmp -prune -o -size -1000k -exec ta...

by ddb521 - Solaris - 2009-05-19 11:43:05 阅读(1089) 回复(0)

各位,在find命令中,里面的-prune参数可以忽略查找指定的目录,可是我在用该命令遇到如下问题,请各位指点一下,谢谢 # find /root/Desktop/ -path "/root/Desktop/tmp/" -prune -o -print /root/Desktop/ /root/Desktop/shredder.desktop /root/Desktop/trash.desktop /root/Desktop/mycomputer.desktop /root/Desktop/My Documents /root/Desktop/My Documents/RCA.cer /root/Desktop/My Documents/.directory /root/Desktop/t...

by holmes86 - Shell - 2007-12-06 17:48:03 阅读(3839) 回复(8)

我想在目录DIR1 下找到FILE1,不搜索DIR1/DIR2目录中的内容, find 命令的prune如何用???

by billquick - Solaris - 2004-06-10 09:03:08 阅读(1660) 回复(3)

[root@rh9 test]# pwd /test [root@rh9 test]# mkdir -p d1/d2/d3 [root@rh9 test]# touch ff [root@rh9 test]# touch d1/ff [root@rh9 test]# touch d1/d2/ff [root@rh9 test]# touch d1/d2/d3/ff [root@rh9 test]# mkdir new.d [root@rh9 test]# touch new.d/ff [root@rh9 test]# find . -name ff ./d1/d2/d3/ff ./d1/d2/ff ./d1/ff ./ff ./new.d/ff [root@rh9 test]# find . -name "/test/new.d" -prune -name ff [root@rh9 tes...

by kfddc - 系统管理 - 2006-08-08 09:22:58 阅读(717) 回复(0)

条件:目录/abcde下有a、b、c、d、e五个子目录 ①现在希望在/abcde目录下查找文件123,但不希望在/abcde/a下查找 使用find /abcde -name 123 "/abcde/a" -prune -o -print行吗? 应该怎么用呢? ②现在希望在/abcde目录下查找文件123,但不希望在/abcde/a和/abcde/b下查找 使用find /abcde -name 123 "/abcde/a /abcde/b" -prune -o -print行吗? 应该怎么用呢? 请高手指导啊!谢谢!

by smilesmart - Shell - 2007-09-19 10:24:33 阅读(4021) 回复(19)