Bulk Rename on SSH (FTP)

Really simple one, I need to bulk ‘find and replace’ a number of files within a folder, SSH connection with Terminal.app on OSX.

Example below searches for ‘that’ and replaces all instances with ‘this’.

for file in file_is_something_like_that*.jpg; do
mv "$file" "${file//that/this}"

Run that command and immediately the files are renamed.

Leave a Reply