deleting all subversion files from a directory

OK, I've got to give Mercurial a try. In order to import the files from my local working copy (will try hg convert later) I needed to prune out my local copy.

Yes, you can use SVN export as well. But I wanted to try to delete all the files within a directory structure. Here's how to use "find" and "rm" together to remove specific directories in a directory structure:

find . -name '.svn' -type d -print0 | xargs -0 rm -rf

the "find" part of this argument will find all files in and under the current directory named ".svn" that are directories and print them out as a list. those results are piped to xargs to turn into an argument list for rm. the "r" option works through the tree recursively and the "f" option forces removal. This is necessary in order to remove folders that have files in them.

Comments (4)

Based on this post, I'm trying to fathom how it is that you chose a mac over linux :)

Posted over 6 years ago

wdpmpt payday loans 8]]] payday loans 7331 payday loans IhazA payday loans %-[[[
Posted about 1 month ago

ynlahufc payday loans 8]]] payday loans tDCbHx payday loans 1661 payday loans AlNQy
Posted about 1 month ago

dqtboyh sameday loan 0510 money mutual syYvWv spot loan exoCoj payday loans 6825 sameday payday loans online 3152
Posted 11 days ago