> 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. Linux往log中写日志

    void writelog(const char* log) { time_t tDate; struct tm* eventTime; time(&tDate);//得到系统当前时间 //将 ...

  2. 英特尔的Gen11集成显卡性能再次发力

    这是英特尔首个达到 1 TeraFLOP 算力的图形模块,与第九代酷睿移动版的性能相比,15W Ice Lake-U 在游戏测试场景中,平均帧速率的性能提升了 40%. 与同等的 AMD 产品相比,英 ...

  3. DeepFaceLab更新至2019.12.19

    简而言之就是:人脸转换更加稳定和精确,切脸上下边界对齐,增加侧脸和嘴巴的识别面积,所以在这个版本之前的模型需要额外的训练.好消息是,如果你目前素材的嘴巴和侧脸识别有问题,可以重新提取脸部. 之前和之后 ...

  4. angularjs 代码结构两种写法

    1.当路由中不写controller的时候,controller写在对应的html表单中 2.若要写在路由中,如下 3.转到相应的路由(页面) 1.采用location服务 2.采用 transiti ...

  5. 【shell】文本匹配问题

    原文本通过TITLE分段 TITLE1 xxx yyy TITLE2 xxx yyy hello zzz hello TITLE3 xxx hello 类似于这样的,hello可能有多个,需要打印出含 ...

  6. TypeScript作为前端开发你必须学习的技能二)

    TypeScript 变量声明 变量是一种使用方便的占位符,用于引用计算机内存地址.我们可以把变量看做存储数据的容器. TypeScript 变量的命名规则:和javascript一样.除了下划线 _ ...

  7. Email 发送

    namespace 99999 { /// <summary> /// Common interfaces to connect mail server to process e-mail ...

  8. SDRAM学习笔记

    摘自“开源骚客视频教程” 1.仲裁模块就是用来控制什么时候读.写.刷新 2.模块中的状态机 3.初始化时序图说明,来自“IS42S116160.pdf”文件 4.SDRAM写时序图,来自“IS42S1 ...

  9. TTTTTTTTTTTTTT POJ 3678 与或异或 2-SAT+强连通 模板题

    Katu Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9129 Accepted: 3391 Descripti ...

  10. BZOJ 3168 Luogu P4100 [HEOI2013]钙铁锌硒维生素 (矩阵求逆、二分图匹配)

    线性代数+图论好题. 题目链接: (bzoj) https://www.lydsy.com/JudgeOnline/problem.php?id=3168 (luogu) https://www.lu ...