/ Published in: Bash

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# This searches recursively for all directories (-type d) in the hierarchy starting at "." (current directory), and finds those whose name is '.svn'; the list of the found directories is then fed to rm -rf for removal. find . -name '.svn' -type d | xargs rm -rf # If you want to try it out, try find . -name '.svn' -type d | xargs echo # This should provide you with a list of all the directories which would be recursively deleted. ================================== # Another way is: find . -name ".svn" -exec rm -rf {} \; #Try something like this first to do a dry run: find . -name ".svn" -exec echo {} \; #Note that the empty braces get filled in with the file names and the escaped semicolon ends the command that is executed (starting after the "-exec").
Comments
