Find and rename

Find and suffix (added .bak)

$ find . -type f -name 'file\*' -exec mv {} {}.bak\;

Find and rename extension (.html => .gohtml)

$ find ./ -depth -name "\*.html" -exec sh -c 'mv "$1" "${1%.html}.gohtml"' \_ {} \;
Comments