How can one change the first letter of a filename to uppercase using a command line?
IS there any command line to do so?
rename -n 's/./\U$&/' *
-nonly shows what changes will be made. After you verify the changes, run without
-nto actually rename the files.
substitutes the first character (
.) with the uppercase (
\U) of whatever was matched (
$ ls bar foo $ rename -n 's/./\U$&/' * rename(bar, Bar) rename(foo, Foo)