In what order are the dated ordered by? Certainly not alphanumeric order.
ls -lt sorts by modification time. But I need creation time.
Most unices do not have a concept of file creation time. You can't make
If your unix variant has a creation time, look at its documentation. For example, on Mac OS X (the only example I know of¹), use
Note that the ctime (
However, some filesystems, as
You would get something like that mentioning
This command may take some time to return, probably because it also lists every extent related to the file.
Now if you want to order files by creation date, I guess this is not easily (nor properly) possible. As Gilles says, it would probably be easier if you'd use a revision control system. But you may try to have a look at the
I tried the
Here's a Perl script which uses Totor's answer to achieve what you want (if your filesystem is ext4).
Works on my home machine (Ubuntu) and my server (CentOS), but not tested beyond that, so ymmv.