Last active
August 29, 2015 14:24
-
-
Save traedamatic/a152e76a0aa32d5453bd to your computer and use it in GitHub Desktop.
LINUX - replace whitspaces in file names
This file contains hidden or 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
# linux | |
find -name "* *" -type f | rename 's/ /_/g' | |
# mac with zsh | |
#In zsh, this is easily done with the zmv function. Put autoload -U zmv in your ~/.zshrc, or run this once in your shell, then: | |
# @see http://unix.stackexchange.com/questions/71690/delete-whitespace-in-filenames-in-directory | |
zmv '* .pdf' '${f// /}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment