【linux】的文件按时间排序
> 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】的文件按时间排序的更多相关文章
- LINUX的文件按时间排序
转载 2014年12月29日 00:49:23 20298 > ls -alt # 按修改时间排序 > ls --sort=time -la # 等价于> ls -alt > ...
- linux_常用命令_(ls, lsof,nslookup)_查看文件按照时间排序
平时收集些用到的命令 方便使用 1: ls -lrt 按时间排序 展示 2:nslookup 查看dns解析 3:lsof -p 进程号 lsof `which httpd` //那个进程在使用 ...
- linux中文件的时间属性atime/mtime/ctime
文件的时间属性的概念 上图第7-9是时间,默认是ctime(文件修改时间),有三种时间属性: modify time mtime (文件内容被修改的时间) change ti ...
- linux 修改文件的时间属性
二.修改文件时间 创建文件我们可以通过touch来创建.同样,我们也可以使用touch来修改文件时间.touch的相关参数如下: -a : 仅修改access time. -c : 仅修改时间,而不建 ...
- linux查看文件具体时间和大小
查看具体时间 ll --full-time 查看文件大小: ll -ht 或者du -sh *
- Linux中ls对文件进行按大小排序和按时间排序,设置ls时间格式
1 按文件大小排序 使用 ll -S | grep '^[^d]' // 格式化文件大小形式 ll -Sh | grep '^[^d]' 2 按文件修改时间排序显示 使用 ll -rt 3 设置ls ...
- 目录和文件 按创建时间排序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 ...
- 如何对sharepoint图片库的文件夹的图片按照时间排序并分页显示
/// <summary> /// 获取图片库第一层文件夹--根据文件夹名称排序 /// </summary> /// <param name="siteUrl ...
- Linux的文件时间
在windows下,一个文件有:创建时间.修改时间.访问时间.而在Linux下,一个文件也有三种时间,分别是:访问时间.修改时间.状态改动时间. 1.访问时间,读一次这个文件的内容,这个时间就会更新. ...
随机推荐
- js获取两个经纬度之间的角度(0度-360度)
/** * 获取角度 */mapNumberUtil.getAngle = function(lng_a,lat_a, lng_b, lat_b){ var a = (90 - lat_b) * Ma ...
- 将shell脚本的执行过程和执行结果导入到log文件中
[root@localhost scripts]# vim ping.sh #!/bin/bash set -x ##分步执行 exec &> /tmp/log.txt ##脚本执行的过 ...
- (转) 【oracle调优】优化全表扫---cache整张表或索引
情景分析: 1)某查询必须要走全表扫描 2)该查询执行的频率相当高 3)对执行时间的要求也相当苛刻的话 4)数据库的IO比较吃紧 5)数据库的内存比较宽松 6)该表的大小没有大到离谱 以上情况下,可以 ...
- ActiveMQ与Spring / SpringBoot 整合(四)
1. 对 Spring 的整合 1.1 所需jar 包 <!-- activeMQ jms 的支持 --> <dependency> <groupId>org.sp ...
- mapper映射文件配置之insert、update、delete(转载)
原文地址:http://www.cnblogs.com/dongying/p/4048828.html 在mapper文件中,以mapper作为根节点,其下面可以配置的元素节点有: select, i ...
- Hadoop中配置环境后重启失效解决方法
Ubuntu下设置环境变量有三种方法,一种用于当前终端,一种用于当前用户,一种用于所有用户: 一:用于当前终端: 在当前终端中输入:export PATH=$PATH:<路径> 不过上面的 ...
- Codeforces Round #568 (Div. 2) C2. Exam in BerSU (hard version)
链接: https://codeforces.com/contest/1185/problem/C2 题意: The only difference between easy and hard ver ...
- 【ZJOJ1321】灯
题目 贝希和她的闺密们在她们的牛棚中玩游戏.但是天不从人愿,突然,牛棚的电源跳闸了,所有的灯都被关闭了.贝希是一个很胆小的女生,在伸手不见拇指的无尽的黑暗中,她感到惊恐,痛苦与绝望.她希望您能够帮帮她 ...
- Idea+Spring boot 开启热部署
热部署是spring boot的一大亮点功能,开发者不必因为改动一点代码就去频繁的关开服务. 1) 在pom文件中加载热部署依赖和插件 2)CTRL + SHIFT + A --> 查找make ...
- TypeScript作为前端开发你必须学习的技能(一)
2019年,TypeScript已经开始渐渐的崭露头角,各大框架都说要使用TypeScript,虽然现在还没有完美,但是TypeScript很有可能会成为下一个主流技术. 废话就不多说了,直接开始吧. ...