I have a script that is copying a folder that contains a couple sub folders. The original that it is copying from is part of an SVN folder, so it is copying those ".svn" folders as well.
I want to remove those from the new destination, my best guess was:
rm -Rf dir/*.svn
Which doesn't work, is there a way to do this or do I need to manually go into each folder to delete it?
From within the folder whose contents you want to filter:
find . -name '.svn' -print0 | xargs -0 rm -rf
or
find . -name '.svn' -exec rm -rf {} \;
Take a look at this: http://snippets.dzone.com/posts/show/2486
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With