title: SFTP get last created/modified files
body: <p>I connect to the server via sftp connection. I should get two files: last created/modified *.sql and *.bkp files.</p>
  
  <p>I've tried something like 
  <code>ls -t &gt;&gt;  list_of_files</code>
  then to download it to my local mashine </p>
  
  <pre><code> get list_of_files
   cat list_of_files | grep *sql | head -1 &gt;&gt; sql_filename
   cat list_of_files | grep *sql | head -1 &gt;&gt; bkp_filename
  </code></pre>
  
  <p><code>ls -t &gt;&gt;  list_of_files</code> outputs 
  <code>Can't ls: "path" not found</code></p>
  
  <p>Now i got the names of these two files, how can i get it from the sftp server ? </p>
  
  <p>How can i make it right ?</p>