title: Detect SFTP file upload completed
body: <p>I have an SFTP server (debian ssh server) where remote users are uploading once a while one big file into a specific directory.</p>
  
  <p>My challenge is that I need to detect:</p>
  
  <p>1) that a new file is present.</p>
  
  <p>2) that the upload process/transmission is done.</p>
  
  <p>What would be the best way to do this? Maybe there is already some tools available for this?</p>
  
  <p>Logically thinking I can maybe detect in a first phase that a new file is present in the directory. And in a second phase then loop/wait until the user SFTP disconnects!? After that I could fire the next process...</p>
  
  <p>Thx &amp; cheers,
  Peter</p>