The following command will replace match
with replace
for all files in the cwd
, and create a soft link to the new file name using the old file name.
$ find . -name '*.mkv' -type f -exec bash -c 'mv "$1" "${1/match/replace.}" && ln -s "${1/match/replace.}" "$1"' -- {} \;
So:
ls -l
total 27477872
-rw-r--r--. 1 george media_ 3517838477 Jan 9 20:04 match04e01.mkv