title: How can I sort file names by version numbers?
body: <p>In the directory "data" are these files:</p>
  
  <blockquote>
    <p>command-1.9a-setup<br>
    command-2.0a-setup<br>
    command-2.0c-setup<br>
    command-2.0-setup </p>
  </blockquote>
  
  <p>I would like to sort the files to get this result:</p>
  
  <blockquote>
    <p>command-1.9a-setup<br>
    command-2.0-setup<br>
    command-2.0a-setup<br>
    command-2.0c-setup </p>
  </blockquote>
  
  <p>I tried this</p>
  
  <pre><code>find /data/ -name 'command-*-setup' | sort --version-sort --field-separator=- -k2 
  </code></pre>
  
  <p>but the output was</p>
  
  <blockquote>
    <p>command-1.9a-setup<br>
    command-2.0a-setup<br>
    command-2.0c-setup<br>
    command-2.0-setup </p>
  </blockquote>
  
  <p>The only way I found that gave me my desired output was</p>
  
  <pre><code>tree -v /data
  </code></pre>
  
  <p>How could I get with sort the output in the wanted order?</p>