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 http://paydayloansmsa.com/ payday loans 8]]] http://paydayloansusaprh.com/ payday loans 7331 http://2012paydayloans.net/ payday loans IhazA http://paydayloansqda.com/ payday loans %-[[[
Posted about 1 month ago

ynlahufc http://paydayloans24x7.com/ payday loans 8]]] http://paydayloansmsa.com/ payday loans tDCbHx http://2012paydayloans.net/ payday loans 1661 http://paydayloansitm.com/ payday loans AlNQy
Posted about 1 month ago

dqtboyh http://paydayloansqxj.com/ sameday loan 0510 http://paydayloansqxs.com/ money mutual syYvWv http://paydayloansqxf.com/ spot loan exoCoj http://paydayloansqxd.com/ payday loans 6825 http://paydayloansqxq.com/ sameday payday loans online 3152
Posted 11 days ago

Comment: