I have a directory structure like this:
./
whatever/
foos_whatever.ext
something/
foo/
1.ext
2.ext
another/
foo.ext
I want to rename all files and directories that contain foo
. I would like to replace foo
with bar
.
Here is what I am trying:
[naomi ~/app]$ find . -name '*foo*' -exec f={} && mv -v f ${f/foo/bar} \;
This is the error I am receiving:
find: -exec: no terminating ";" or "+"
Thanks for any help :D