title: How to get oldest file in ftp directory using bash script
body: <p>I have a working script that get all file list in a ftp directory and sae it in a local file with this:</p>
  
  <pre><code>curl -s -l ftp://username:password@ftpserver.com/directory/ &gt; source.txt
  </code></pre>
  
  <p>Now, I need to sort this result by creation date instead of name. I only need to write the oldest file name in the source.txt file. Is it possible?</p>
  
  <p>Thank you.</p>