Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.svn我尝试通过以下方式递归删除目录:
.svn
system("rm -rf `find . -type d -name .svn`");
但是,我想使用 Perl 函数rmtree(来自File::Path)做同样的事情。怎么做到呢?
rmtree
File::Path
use File::Find::Rule qw( ); use File::Path qw( rmtree ); rmtree([ File::Find::Rule ->directory ->name('.svn') ->prune ->in('.') ]);
你的版本没有修剪,但它应该有。