Hint from http://stackoverflow.com/questions/2709458/bash-script-to-replace-spaces-in-file-names Uploading files to a web site for a customer, the customer frequently places spaces into the file names, which should be removed. From the GNU/Linux command line, to replace space characters in file names with an underscore character, try this: find -name “* *” -type f | rename ‘s/ /_/g’