Is there a way to rename all files in a directory to lowercase|uppercase?
I am looking for a oneliner command.
I loved TotalCommander's
alt+f7, now I need that functionality in the Terminal
For each file
For upper case reverse the arguments to
For even more control
For example in a directory containing 1.txt, 2.txt, 3.txt, 1.jpg, 2.jpg and 3.jpg in order to filter only *.jpg files,
The above code will assign to
There's a more elegant and general utility called
Written by Larry Wall, it comes with
Using it you can rename multiple files in one command by providing any perl expression (including but not limited to substitution
And so on.
Another nice thing about prename is that it protects you, in the case of renaming a file to an existing file name.