This should be fairly fast:
find . -type f | upper.pl
Where upper.pl is:
#!/usr/bin/perl
while (<>) {
chomp();
my $oldname = $_;
my $newname = $oldname;
$newname =~ s#^(.+)/([^/]+)$#$1/\U$2\E#;
rename($oldname, $newname) if ($oldname ne $newname);
}
If you also want to change directories, run it again with:
find . -depth -type d | upper.pl
You could potentially do it in one step, but it would take me longer to write.
Edit: Actually, I think you can do it all in one step with just "find . -depth | upper.pl".Edge cases that fail include having filenames and pathnames with spaces in them, and providing filenames without any slashes in them. Thus, make sure to do "find ." and not "find *".
Also, I'd definitely test this out in a sandbox somewhere. I've done about 3 minutes of testing, if that.