清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#!/usr/bin/perl
#use Cwd;
sub RightAll(){
local($dir) = @_;
opendir(DIR,"$dir"|| die "can't open $dir");
local @files =readdir(DIR);
closedir(DIR);
for $file (@files){
next if($file=~m/\.$/ || $file =~m/\.\.$/);
if ($file =~/\.(sh|pl|bin|run|bundle|rb|py)$/i){
system "chmod +x \"$dir\/$file\"";
}
elsif(-d "$dir/$file"){
RightAll("$dir/$file" );
}
}
}
&RightAll(getcwd);