2009/1/14 P.V.Anthony <[email protected]>

>
> Found this on the net, "ls -v" and it worked too.
>

mmm, yes - that would appear to be exactly what you want.

Here is what coreutils.info tells us about ls version sort:

10.1.4 More details about version sort
--------------------------------------

The version sort takes into account the fact that file names frequently
include indices or version numbers.  Standard sorting functions usually
do not produce the ordering that people expect because comparisons are
made on a character-by-character basis.  The version sort addresses
this problem, and is especially useful when browsing directories that
contain many files with indices/version numbers in their names:

     $ ls -1            $ ls -1v
     foo.zml-1.gz       foo.zml-1.gz
     foo.zml-100.gz     foo.zml-2.gz
     foo.zml-12.gz      foo.zml-6.gz
     foo.zml-13.gz      foo.zml-12.gz
     foo.zml-2.gz       foo.zml-13.gz
     foo.zml-25.gz      foo.zml-25.gz
     foo.zml-6.gz       foo.zml-100.gz

cheers,
Darren
_______________________________________________
Slugnet mailing list
[email protected]
http://wiki.lugs.org.sg/LugsMailingListFaq
http://www.lugs.org.sg/mailman/listinfo/slugnet

Reply via email to