title: What are all possible linux path chars that need escaping
body: <p>I'm wondering what are all the char needed escaping for a linux path. For example, path /home/user1/My Music/song 1.mp3 would need to be escaped in a shell for ls command 'ls /home/user1/My\ Music/song\ 1.mp3'.</p>
  
  <p>I want to write a function that takes in a String as a path and escape all needed chars.  In scala I have:</p>
  
  <pre><code>  def normalizePath(path: String): String = {
  var normPath = path.replaceAll(" ", "\\\\ ")
  normPath = normPath.replaceAll("\\]", "\\\\]")
  normPath = normPath.replaceAll("\\[", "\\\\[")
  
  normPath
  </code></pre>
  
  <p>}</p>
  
  <p>Knowing that there is more char that need escaping.  Also, this might be able to be done by one command(more complex regex)?</p>