in reply to Order of files returned by readdir
However your OS' underlying readdir() routine returns them. My copy of Stevens (APUE, p108) says that the ordering is implementation dependent and usually not alphabetical. Safest thing to do if you want a particular ordering is to sort the results yourself after the fact.
|
|---|