$ find . -exec bash -c "mv '{}' '\`echo {} |sed -e 's/foo/bar/g'\`"' \;
This command is a more flexible than my previous submission.
It will work with spaces however suuuuper hacky and ugly.
Source: http://www.unix.com/shell-programming-scripting/146173-find-rename-files-using-find-mv-sed.html
by David Winterbottom (codeinthehole.com)























0 Comments
You can be the first one to leave a comment.