Share code snippets.

bulkrename

Created 2 weeks ago by anonymous
bulk rename unix using find and mv
sudo find . -depth -name "*.$fileextension-old" -exec sh -c 'f="{}"; mv -- "$f" "${f%.$fileextension-old}.$fileextensionnew' \;

example 
I want to rename all files ending with   tar.gz.ignored to tar.gz

sudo find . -depth -name "*.tar.gz.ignored" -exec sh -c 'f="{}"; mv -- "$f" "${f%.tar.gz.ignored}.tar.gz"' \;