Re: strange 'find' tool behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Nov 19, 2012 at 04:44:31PM -0800, Gelen James wrote:
> [root@centos_58_test_box workingDir]# find . -type d -name '.svn' -exec /bin/rm -rf '{}' \;
> find: ./.svn: No such file or directory
[...]

"find" is attempting to open the ".svn" directory to see if there are
any subdirectories to work on but it can't because you just deleted it.

You either need "-prune" to stop it going further down the tree or "-depth"
to tell it to go down the tree first before running the -exec


-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux