title: Sorting of files list in directory based on modifaction date in C programming
body: <p>I am trying to figure out how to apply a C program function to sort the file lists of the sub-folders inside my parent directory with modification date.  For instance, if I have 12 files inside a directory called foo, I'd like to sort them by modification date and then remove the oldest 6. How should I approach this?</p>