Lowercase Directory Structure Recursively

We were required to lowercase all directories on a linux server, there was no easy solution so we needed to write one from scratch.

perl -e 'open(FIND, "find |");
while(<FIND>){
	chomp;
	next if $_ eq $0;
	print $_;
	print "=>";
	print lc($_);
	print "\n";
	rename($_,lc($_)) or warn "Rename Failed";
}
close(FIND);'
Share this