Change extension of multiple files

To change the extension of multiple files, e.g. rename .html.bak to .html:

find . -type f -name "*.html.bak" -exec sh -c 'mv {} `basename "{}" .bak`' \;

Last modified: 09/11/2011 Tags:

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top