Skip to content

Instantly share code, notes, and snippets.

@ascendbruce
Created March 6, 2018 08:40
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 ascendbruce/2f95e88588b88f1b8bc558f74f951e51 to your computer and use it in GitHub Desktop.
Save ascendbruce/2f95e88588b88f1b8bc558f74f951e51 to your computer and use it in GitHub Desktop.
Find filenames contain illegal windows characters on Mac/Linux -- regex pattern match windows reserved characters
# Source: https://stackoverflow.com/questions/19008614/find-files-with-illegal-windows-characters-in-the-name-on-linux
# reserved characters for filename on windows: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
find . -name '*[<>:/\\|?*]*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment