title: How to sort files in some directory by the names on Linux
body: <p>I use <code>opendir()</code> and <code>readdir()</code> to display the file names in a directory. But they are disordered. How can I sort them? The language is C.</p>