Reputation: 2132
How can I replace a string in all my folder names in one directory. For example if I have these folders
hellojoe hellomary hellosusan
I want to change these to
worldjoe worldmary worldsusan
Upvotes: 1
Views: 1364
Reputation: 2132
Using this command works
find . -name 'hello*' -exec bash -c 'mv "$1" "${1/hello/world}"' -- {} \;
Upvotes: 2