I have tried a couple of approaches to find and rename some files that hold a backslash (mind you these files generated from a web app do not have the quoets) in a directory. I've tried with find and substitutions but they seem to fail at the parent level. It's basically like it rename the parent, but then fails to descend after to child folders because its referencing the older parent name when descending?
Folder Structure:
'ano\ther' -> 'chi\ld'
When I run:
for file in `find . -name '*\\\*'`; do mv -v "$file" "${file/\\/}"; done`
or
find . -exec rename 's/\\//g' {} +
or
find . -name "*\\\*" -exec rename 's/\\//g' {} +
They pretty much all say the same error, but do rename the parent or present dir, just fail on descending.
Can't rename ./ano\ter/yo\yo ./anoter/yoyo: No such file or directory
What would I be missing in my command?