title: Move all files from one directory to another with limited disk space
body: <p>I have a mounted directory contained several large files. I would like to move those files onto a local directory. However, the local machine has very limited disk space and I've run into an issue where moving these files has failed due to disk space and were subsequently lost. I'm looking for a pythonic way to:</p>
  
  <ol>
  <li>Attempt to move all files from the source directory to the destination</li>
  <li>If we run out of space, move them all back and raise an error (or just return false) without changing ownership or permissions</li>
  </ol>
  
  <p>I do not want to move the directory itself, only its contents. It's okay to overwrite existing files. I see plenty of "How do I move files" questions, but no "what happens if we run out of space" questions.</p>
  
  <p>Local machine is running Centos 7, remote machine is running Solaris 10.</p>