title: bash: move new file as soon as it is written
body: <p>I'm trying to write a bash script to move files from a source to a destination, in order to save space on the disk of the source (source and destination are two different machines).</p>
  <p>I can handle the moving part by using the scp protocol, but the problem is that the software I'm using writes a lot of files very quickly (luckily each file has the same extension) and I want to move a file as soon as it is written.</p>
  <p>So, in the directory of the source, I'd like to:</p>
  <ul>
  <li>move the file on the destination,</li>
  <li>remove the file from the source,</li>
  </ul>
  <p>... until the software stops to write new files on the source.</p>
  <p>Any help?</p>
  <p>Thank you in advance.</p>