<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 24, 2015 at 10:52 PM, IOhannes m zmölnig <span dir="ltr"><<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/24/2015 10:03 PM, Simon Iten wrote:<br>> why does readdir on linux output filenames not in order? 16.* before 10.* for example?<br>
</span>most likely because readdir(3) does not return the filenames in the<br>
order you expect (the order might not be alphabetically but it might be<br>
sorted by inode number; or creation date; or...).<br>
<br>
to cut it short: readdir(3) doesn't guarantee *any* order.<br>
if some filesystems return data in a given order, that is just by accident.<br>
<br>
cf. <a href="http://stackoverflow.com/questions/8977441" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/8977441</a></blockquote><div><br></div><div>+1  ... beat me to it ;-)</div><div><br></div><div>marmosets,</div><div>  Bryan</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Bryan Jurish                           "There is *always* one more bug."<br><a href="mailto:moocow.bovine@gmail.com" target="_blank">moocow.bovine@gmail.com</a>         -Lubarsky's Law of Cybernetic Entomology<br></div></div>
</div></div>