How to sort the files according to the time stamp in unix? [closed]

拟墨画扇 提交于 2019-12-20 08:32:10

问题


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.


回答1:


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.




回答2:


Use -t on ls. e.g:.

ls -tr

or

ls -ltr


来源:https://stackoverflow.com/questions/6023726/how-to-sort-the-files-according-to-the-time-stamp-in-unix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!