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

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -