Skip to content

Instantly share code, notes, and snippets.

@show0k
Last active August 29, 2015 14:24
Show Gist options
  • Save show0k/4fce31019bf99238035b to your computer and use it in GitHub Desktop.
Save show0k/4fce31019bf99238035b to your computer and use it in GitHub Desktop.
Clean files for windows (remove illegal characters)
find . -name "*[<>:\\|?*]*" -exec bash -c 'x="{}"; y=$(sed "s/[<>:\\|?*]\+/-/g" <<< "$x") && mv "$x" "$y" && echo "change $x to $y"' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment