用SVN用多了会发现硬盘空间耗得厉害,因为它会不断在本地生成一系列的辅助文件,在Ubuntu下按Ctrl+H就能看到这些名叫.svn的目录(在WinXp下需要打开文件夹选项的查看隐形文件功能 )。
有时候备份个项目硬盘会$#%%#$响个不停,好不烦燥呀。
搬出Vim,键入:
Bingle!“害虫”一下死光光 :D
有时候备份个项目硬盘会$#%%#$响个不停,好不烦燥呀。
搬出Vim,键入:
#
! /usr/bin/env ruby
require ' find '
require ' fileutils '
DIR = ARGV[ 0 ] || " . "
count = 0
Find . find(DIR) do | path |
if FileTest . directory ? (path) and File . basename(path) == " .svn "
FileUtils . rmtree path
count += 1
end
end
puts " 警告:成功删除了#{count}个目录! "
require ' find '
require ' fileutils '
DIR = ARGV[ 0 ] || " . "
count = 0
Find . find(DIR) do | path |
if FileTest . directory ? (path) and File . basename(path) == " .svn "
FileUtils . rmtree path
count += 1
end
end
puts " 警告:成功删除了#{count}个目录! "
Bingle!“害虫”一下死光光 :D