Bash One-liner for Renaming High-res Image Files to @2x
This tip may be useful to iOS developers when they’re given a bunch of high-resolution files and they need to rename them with the @2x filename suffix.
Supposing the files are all in the same directory (containing only the files you need to rename), just do this in the terminal:
for file in *; do mv "$file" "${file%.*}@2x.${file##*.}"; done
As a result, the files will all be renamed following the pattern <name>@2x.<extension>
.