手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

Linux下清除.svn目录

首页 > Linux >

SVN给开发带来了方便,但在导出的时候,如果选择了checkout,那么目录里是带有.svn目录的,除非是export。

如果您的项目中是checkout的,如果还要export,那就烦了一点。因为export是从服务器上导回来的。如果服务器速度慢(网上的免费SVN服务器),那就更痛苦了。因此直接删除.svn目录是最快的解决方法。

windows下面可以直接搜索.svn,然后delete就行了
linux下面怎么办?

其实更方便,只要一句话
进入项目目录后,运行 find . -name ".svn" | xargs rm -rf
然后你就会发现。.svn目录全没有了。HOHO

 

查了一下google,发现还有另外一个方法:

XML/HTML代码
  1. find -name "CVS" -exec rm -f {} \;  
  2.   
  3. 利用-name和-exec两个参数组合,可以实现批量查找删除指定文件的目的。  
  4.   
  5. 要活用find,它是很强大的。  
  6.   
  7. find [path...] [expression]  
  8.   
  9. -name pattern  
  10.     Base of file name (the path with the leading directories removed) matches shell pattern pattern. The metacharacters (`*', `?', and `[]') do not match a `.' at the start of the base name. To ignore a directory and the files under it, use -prune; see an example in the description of -path.  
  11.   
  12. -exec command ;  
  13.     Execute command; true if 0 status is returned. All following arguments to find are taken to be arguments to the command until an argument consisting of `;' is encountered. The string `{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, not just in arguments where it is alone, as in some versions of find. Both of these constructions might need to be escaped (with a `\') or quoted to protect them from expansion by the shell. The command is executed in the starting directory.  



本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

Tags: svn

« 上一篇 | 下一篇 »

只显示10条记录相关文章

工具介绍: 让服务器自动从Hg版本库中下载代码 (浏览: 40934, 评论: 0)
RabbitVCS 用后感 (浏览: 30162, 评论: 0)
使用GIT进行版本控制 (浏览: 29549, 评论: 3)
svn ignore 命令行用法 (浏览: 28771, 评论: 1)
Linux环境下配置同步更新的SVN服务器 (浏览: 28265, 评论: 1)
svn常用命令 (浏览: 26901, 评论: 0)
svn: E220001: Unreadable path encountered; access denied (浏览: 25187, 评论: 0)
SVN提交更新的一个准则 (浏览: 25106, 评论: 0)
SVN中文手册 (浏览: 24691, 评论: 0)
Windows下SVN服务器的架设 (浏览: 23816, 评论: 0)

发表评论

评论内容 (必填):