title: Unix - create path of folders and file
body: <p>I know you can do <code>mkdir</code> to create a directory and <code>touch</code> to create a file, but is there no way to do both operations in one go?</p>
  
  <p>i.e. if I want to do the below when the folder <code>other</code> does not exist:</p>
  
  <pre><code>cp /my/long/path/here/thing.txt /my/other/path/here/cpedthing.txt
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>cp: cannot create regular file `/my/other/path/here/cpedthing.txt': No such file or directory
  </code></pre>
  
  <p>Has anyone come up with a function as a workaround for this?</p>