递归删除.svn_递归删除.svn目录

递归删除.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”替换为您选择的搜索,但要小心:如果搜索词过于笼统,您可能最终会删除一堆您不想使用的东西!

翻译自: https://davidwalsh.name/delete-svn

递归删除.svn

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值