Article 5KDN4 ls odd sorting

ls odd sorting

by
Skaperen
from LinuxQuestions.org on (#5KDN4)
i really didn't need any particular sorting for these 3 files but how ls sorted them caught my attention. the man page didn't explain this and i could find nothing that did in a few duckduckgo searches.
Code:lt2a/phil /home/phil 42> ls -A1 yyyy*mm*dd*hh*mm*ss*.py
yyyy_mm_dd_hhmmss_mmmuuunnn.py
yyyymmddhhmmssmmmuuunnn.py
yyyy_mm_ddThhmmss_mmmuuunnn.py
lt2a/phil /home/phil 43> ls -A1 yyyy*mm*dd*hh*mm*ss*.py|sort
yyyy_mm_ddThhmmss_mmmuuunnn.py
yyyy_mm_dd_hhmmss_mmmuuunnn.py
yyyymmddhhmmssmmmuuunnn.py
lt2a/phil /home/phil 44>there is no problem to solve because i orginally did ls to check the protection setting of these three new files. it caught my attention because the oddly named file came out sorted between the other two and the sort command produced what i expected. anyone know what search key i should hae used?latest?d=yIl2AUoC8zA latest?i=O7hqK4q5lok:ONZolHT6pG4:F7zBnMy latest?i=O7hqK4q5lok:ONZolHT6pG4:V_sGLiP latest?d=qj6IDK7rITs latest?i=O7hqK4q5lok:ONZolHT6pG4:gIN9vFwO7hqK4q5lok
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