Hi all,

Just encountered an strange bahavior of frequent 'find' command. I tried to use 
find to recursively remove .svn directories from my working place, 'find' 
command removed all the '.svn' directories successfully but reported errors on 
screen. Any one knows why it shows this behavior?

BTW, if I use command " find . type d -name '.svn' -print0 | xargs -0 -n1 
/bin/rm -rf ", then it does the same job and reports no errors on screen at 
all. But still likes to understand why find have this behavior.

The screen and error prompts are attached below for your references. Thanks.

[root@centos_58_test_box workingDir]# find . -type d -name 
'.svn'                                                                                                                                
 
./.svn                                                                                                                                                                                           
 
./var/.svn                                                                                                                                                                                       
 
./var/myTestProj/projects/.svn                                                                                                                                                                   
 
./var/myTestProj/projects/Production/.svn                                                                                                                                                        
 
./var/myTestProj/projects/Production/etc/.svn                                                                                                                                                    
 
./var/myTestProj/projects/Production/jobs/.svn                                                                                                                                                   
 
./var/myTestProj/.svn                                                                                                                                                                            
 
./etc/.svn                                                                                                                                                                                       
 
./etc/myTestProj/.svn                                                                                                                                                                            
 
./etc/myTestProj/ssl/.svn                                                                                                                                                                        
 
[root@centos_58_test_box workingDir]# find . -type d -name '.svn'  -exec  
/bin/rm -rf '{}' 
\;                                                                                                    
 
find: ./.svn: No such file or 
directory                                                                                                                                                          
 
find: ./var/.svn: No such file or 
directory                                                                                                                                                      
 
find: ./var/myTestProj/projects/.svn: No such file or 
directory                                                                                                                                  
 
find: ./var/myTestProj/projects/Production/.svn: No such file or 
directory                                                                                                                       
 
find: ./var/myTestProj/projects/Production/etc/.svn: No such file or 
directory                                                                                                                   
 
find: ./var/myTestProj/projects/Production/jobs/.svn: No such file or 
directory                                                                                                                  
 
find: ./var/myTestProj/.svn: No such file or 
directory                                                                                                                                           
 
find: ./etc/.svn: No such file or 
directory                                                                                                                                                      
 
find: ./etc/myTestProj/.svn: No such file or 
directory                                                                                                                                           
 
find: ./etc/myTestProj/ssl/.svn: No such file or 
directory                                                                                                                                       
 
[root@centos_58_test_box workingDir]# find . -type d -name 
'.svn'                                                                                                                                
 
[root@centos_58_test_box workingDir]# 

Thanks.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to