> ls -alt # 按修改时间排序
> ls --sort=time -la # 等价于> ls -alt
> ls -alc # 按创建时间排序
> ls -alu # 按访问时间排序 # 以上均可使用-r实现逆序排序
> ls -alrt # 按修改时间排序
> ls --sort=time -lra # 等价于> ls -alrt
> ls -alrc # 按创建时间排序
> ls -alru # 按访问时间排序

实例:按文件生成时间倒序排列

[root@ log]# ls -alt
总用量
drwxr-x---. root root 10月 : ..
drwxr-x---. root root 10月 : .
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt
-rw-r----- root root 10月 : result-.txt

参考文档:LINUX的文件按时间排序

【linux】的文件按时间排序的更多相关文章

  1. LINUX的文件按时间排序

    转载 2014年12月29日 00:49:23 20298 > ls -alt # 按修改时间排序 > ls --sort=time -la # 等价于> ls -alt > ...

  2. linux_常用命令_(ls, lsof,nslookup)_查看文件按照时间排序

    平时收集些用到的命令 方便使用 1:  ls -lrt 按时间排序  展示 2:nslookup  查看dns解析 3:lsof -p 进程号 lsof `which httpd` //那个进程在使用 ...

  3. linux中文件的时间属性atime/mtime/ctime

    文件的时间属性的概念 上图第7-9是时间,默认是ctime(文件修改时间),有三种时间属性: modify time        mtime       (文件内容被修改的时间) change ti ...

  4. linux 修改文件的时间属性

    二.修改文件时间 创建文件我们可以通过touch来创建.同样,我们也可以使用touch来修改文件时间.touch的相关参数如下: -a : 仅修改access time. -c : 仅修改时间,而不建 ...

  5. linux查看文件具体时间和大小

    查看具体时间 ll --full-time 查看文件大小: ll -ht 或者du -sh *

  6. Linux中ls对文件进行按大小排序和按时间排序,设置ls时间格式

    1 按文件大小排序 使用 ll -S | grep '^[^d]' // 格式化文件大小形式 ll -Sh | grep '^[^d]' 2 按文件修改时间排序显示 使用 ll -rt 3 设置ls ...

  7. 目录和文件 按创建时间排序du -h --time --max-depth=1 . |sort -r -t $'\t' -k 2 Linux查看文件夹大小,并按文件夹创建时间排序

    目录和文件 按创建时间排序 # du -h --time --max-depth=1 . |sort -r -t $'\t' -k 230M 2020-04-01 14:54 .28K 2020-04 ...

  8. 如何对sharepoint图片库的文件夹的图片按照时间排序并分页显示

    /// <summary> /// 获取图片库第一层文件夹--根据文件夹名称排序 /// </summary> /// <param name="siteUrl ...

  9. Linux的文件时间

    在windows下,一个文件有:创建时间.修改时间.访问时间.而在Linux下,一个文件也有三种时间,分别是:访问时间.修改时间.状态改动时间. 1.访问时间,读一次这个文件的内容,这个时间就会更新. ...

随机推荐

  1. 初探CSS - 5 创建

    CSS 创建 当读到一个样式表时,浏览器会根据它来格式化 HTML 文档. 如何插入样式表 插入样式表的方法有三种: 外部样式表(External style sheet) 内部样式表(Interna ...

  2. 初探html-17 表单

    HTML 表单和输入 HTML 表单用于收集不同类型的用户输入. 在线实例 <form action=""> First name: <input type=&q ...

  3. 2019.10.17 CCSP自闭打铜

    很幸运被珠姐第二次抓过来参加CCSP(第二次看xmk夺冠),不过今年的题目还是那么让人心肌梗塞呢(听题解的时候基本都能听懂也算是进步了8). 比赛前一天晚上躺在宾馆里,做梦梦见自己在打比赛,局面应该是 ...

  4. 清北学堂提高组突破营游记day5

    长者zhx来啦.. (又要送冰红茶了...) zhx一上来就讲动态规划...是不是要逼死人.... 动态规划: 最简单的例子:斐波那契数列.因为他是递推(通项公式不算)的,所以前面的已经确定的项不会影 ...

  5. CentOS7安装并使用Ceph

    1.准备工作1.1 安装配置NTP官方建议在所有 Ceph 节点上安装 NTP 服务(特别是 Ceph Monitor 节点),以免因时钟漂移导致故障. ln -sf /usr/share/zonei ...

  6. java面向对象3-继承(继承、抽象类、抽象接口)

    4.继承 面向对象概念-类与对象的关系 封装:指隐藏对象的属性和实现细节,仅对外提供公共访问方式,private-构造方法/构造器-this关键字-static关键字(javadoc制作工具类) -代 ...

  7. Python---webserver

    一. # HTTP项目实战 - 深入理解HTTP协议 - 模拟后台服务程序基本流程和大致框架 - 每一个步骤一个文件夹 - 图解http协议,图解tcp/ip协议 # v01-验证技术 - 验证soc ...

  8. R中的常用命令(持续更新)

    (1)工作环境 #Ctrl+L键:清屏#Ctrl+Shift+C键:注释.取消注释(仅在RStudio中)(可以多行) rm(变量) #清除某变量 ls() #列出内存中的变量 rm(list=ls( ...

  9. mysql57 在windows 下无法修改 大小写设置

    参考: https://blog.csdn.net/ceciliawanghenan/article/details/82916662 清空data文件,我的data文件在programdata\My ...

  10. F12谷歌开发者工具preserve log

    谷歌开发者工具里面这个preserve log :保留请求日志,跳转页面的时候勾选上,可以看到跳转前的请求,也可适用于chrome开发者工具抓包的问题