Created
January 12, 2022 15:21
-
-
Save emjayoh/f21c304b3fde2caabbffb06a0a536591 to your computer and use it in GitHub Desktop.
[remove spaces] removes pesky spaces from things like filenames #bash #terminal #copypaste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -depth -name '* *' \ | |
| while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment