Communities for your favorite technologies. Explore all Collectives
Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Get early access and see previews of new features.
find . -depth -name '* *' \ | while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
failed to get it right at first, because I didn't think of directories.
find . -depth -name '* *' \ | while read f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
find . -depth -name '* *' -depth \ | while read f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
find . -name '* *' -depth \ | while read f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
find . -name '* *' | sort -rdepth \ | while read f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
find . -name '* *' | sort -r \ | while read f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done