递归删除.svn
Version control systems are hugely important when it comes to development of all kinds. I'm a huge fan of git but sometimes I'm required to use SVN. Unfortunately I tend to forget to remove .svn folders when I copy and paste from a directory structure template. This, of course, leads to me overwriting files and results in mass confusion. I recently stumbled up an awesome command line script which recursively removes .svn directories from parent directories.
当涉及到各种开发时,版本控制系统非常重要。 我是git的忠实粉丝,但有时需要使用SVN。 不幸的是,当我从目录结构模板复制和粘贴时,我往往忘记删除.svn文件夹。 当然,这导致我覆盖文件并导致大量混乱。 我最近偶然发现了一个很棒的命令行脚本,该脚本递归地从父目录中删除了.svn目录。
find . -type d -name .svn -exec rm -rf {} \;
The script starts within the current directory, so be sure you navigate to the directory you want to start searching from first. This script would work on any search type; simply replace ".svn" with the search of your choosing but be careful: if your search term is too general, you may end up deleting a bunch of stuff you don't want to!
该脚本在当前目录内启动,因此请确保先导航到要开始搜索的目录。 该脚本适用于任何搜索类型; 只需将“ .svn”替换为您选择的搜索,但要小心:如果搜索词过于笼统,您可能最终会删除一堆您不想使用的东西!
递归删除.svn