Article 5MTS9 which is the correct way to sort file names?

which is the correct way to sort file names?

by
Skaperen
from LinuxQuestions.org on (#5MTS9)
which is the correct way to sort file names? the way ls does it or the way sort does it? here, you can see a difference for some of my recent files:
Code:lt2a/phil /home/phil 97> ls -1 ftrgen*.py
ftrgen1.py
ftrgen2.py
ftrgen3.py
ftrgen4.py
ftrgend.py
ftrgenf.py
ftrgen.py
ftrgenrules.py
ftrgent.py
lt2a/phil /home/phil 98> ls -1 ftrgen*.py|sort
ftrgen.py
ftrgen1.py
ftrgen2.py
ftrgen3.py
ftrgen4.py
ftrgend.py
ftrgenf.py
ftrgenrules.py
ftrgent.py
lt2a/phil /home/phil 99>latest?d=yIl2AUoC8zA latest?i=PivvSVvCifs:paDonGoZzsU:F7zBnMy latest?i=PivvSVvCifs:paDonGoZzsU:V_sGLiP latest?d=qj6IDK7rITs latest?i=PivvSVvCifs:paDonGoZzsU:gIN9vFwPivvSVvCifs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments