The following lines were added (+) and removed (-):
done done These may fail on unsupported file systems such as FAT32 with an error such as: mv: 'IMAG0001.JPG' and 'imag0001.jpg' are the same file ./IMAG0004.JPG not renamed: ./imag0004.jpg already existsIn this case you will have to move when you change case and move back again. Here we will change an uppercase file extension to a lowercase one under FAT32 rename 's/\.JPG$/\.jpeg/' *.JPG rename 's/\.jpeg$/\.jpg/' *.jpeg There are plenty of other ways to accomplish such tasks.