I using python 2.7 in ubuntu. How do i sort files in more detail order because i had a script that create into numbers of txt flies for split seconds. I had mod a script, it can find the oldest and youngest file but it seem like it just compare with the second but not milliseconds.
My print output:
output_04.txt 06/08/12 12:00:18
output_05.txt 06/08/12 12:00:18
-----------
oldest: output_05.txt
youngest: output_05.txt
-----------
But the right order of oldest file should be "output_04.txt". Any expertise know? Thanks!
Updated: Thanks everyone. I did try out with all of the codes but seem like can't have the output i need. Sorry guys, i did appreciated you all. But the example of my files like above have the same time, so if the full-date, hour, min, sec are all the same, it have to compare by millisecond. isn't it? Correct me if im wrong. Thanks everyone! Cheers!