Renaming files

To renamed from ‘*.abcd.def’ to ‘*.abc’;

find ./ -depth -name "*.abcd.def" -exec sh -c 'mv "$1" "${1%.abcd.def}.abc"' _ {} \;

When using GIT;

find ./ -depth -name "*.abcd.def" -exec sh -c 'git mv "$1" "${1%.abcd.def}.abc"' _ {} \;

Source; https://askubuntu.com/questions/35922/how-to-change-extension-of-multiple-files-from-command-line

Leave a Reply