[CentOS] strange 'find' tool behavior

Tue Nov 20 00:52:24 UTC 2012
Stephen Harris <lists at spuddy.org>

On Mon, Nov 19, 2012 at 04:44:31PM -0800, Gelen James wrote:
> [root at 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