Order files by creation time to the millisecond in Bash -
i need create list of files located on hard disk in order of when arrived on hard disk. so, have used following:
ls -lat
which lists files in date/time order, however, orders them nearest second. problem here there thousands of files , every often, few of them come clumped in same second. need exact correct ordering. i'm guessing easiest way creation time milli (or perhaps nano) second. this, have tried using following:
stat $myfile
to @ modification time, shows hour:minute:second.00000000000.
is there way this? thanks, rik
the accuracy depends on file system using, high accuracy file system such ext4, standard implementation of stat uses time_t has 1 second resolution.
if have access source of program spitting out files, try setting timestamp part of filename instead , sort on filename rather modification time.
Comments
Post a Comment