Below is a simple one liner that will replace the spaces with an underscore for all files in the current directory.
find . -type f -name “* *” -maxdepth 1| while read src; do mv “$src” `echo $src | tr ” ” “_”`; done
Below is a simple one liner that will replace the spaces with an underscore for all files in the current directory.
find . -type f -name “* *” -maxdepth 1| while read src; do mv “$src” `echo $src | tr ” ” “_”`; done