find a pattern in files and rename them [closed]

You are echo’ing your ‘mv’ command, not actually executing it. Change to:

find . -name '*-GHBAG-*' -exec bash -c 'mv $0 ${0/GHBAG/stream-agg}' {} \;

Leave a Comment