Skip to content

Instantly share code, notes, and snippets.

@timisenheim
Last active January 31, 2019 09:29
Show Gist options
  • Save timisenheim/8d825d428ff03e7c0e85 to your computer and use it in GitHub Desktop.
Save timisenheim/8d825d428ff03e7c0e85 to your computer and use it in GitHub Desktop.
Replace spaces in filenames with underscores
find -name "* *" -type d | rename 's/ /_/g' # directories
find -name "* *" -type f | rename 's/ /_/g' # files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment