Bash Scripting 101 – Change file names from lower case to upper case and vice versa

The following command line changes filenames recursively from lower case to upper case and vice versa, just change the position of lower and upper:

find . -type f|while read f; do mv $f `echo $f |tr „[:lower:]“ „[:upper:]“`; done

WARNING: Allways be careful when you use a shell command, I don’t take any responsibility for accidents or data loss that result from using the shown example commands. If you want to know more about the used commands, take a look in the associated manpages.

PS: Thanks to Berta from command-line-fu

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert