title: Change spaces to underscores in filename - Linux
body: <p>I need to convert any and all files with a space or spaces in the names to underscores from a given path.</p>
  
  <p>Right now I have <code>for file in *; do mv "$file" ${file// /_}; done</code></p>
  
  <p>How would I go about changing that to a specific directory and run it?</p>
  
  <p>This command will also only show the new files ( not dir's, hidden files etc.)</p>
  
  <p><code>ls -1ap ${newDir} | grep -v /</code></p>