How to sort the files according to the time stamp in unix?

Srihari picture Srihari · May 16, 2011 · Viewed 130.4k times · Source

How to sort the files according to the time stamp in unix? I need to sort the files and also based on time they created.

Answer

ninjalj picture ninjalj · May 16, 2011

File modification:

ls -t

Inode change:

ls -tc

File access:

ls -tu

"Newest" one at the bottom:

ls -tr

None of this is a creation time. Most Unix filesystems don't support creation timestamps.