Skip to content

Instantly share code, notes, and snippets.

@anubhavsinha
Created August 8, 2014 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anubhavsinha/42737c507696efe06dc2 to your computer and use it in GitHub Desktop.
Save anubhavsinha/42737c507696efe06dc2 to your computer and use it in GitHub Desktop.
remove bad file names - names with white space in them.
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