How can I order files in a directory by their true numeric order.
file1.txt file2.txt file11.txt ...
I think it\'s called : Natural Order
Use the -v option:
-v
ls -v file* file1 file2 file11 file12
Another option may be using sort -V, assuming that one is available on your platform:
sort -V
ls file* |sort -V