Linux shell - 按时间和文件大小排序显示文件(ll)

在工作中有这样的情况,需要显示所有的文件,按照时间先后或者文件大小先后排序显示

命令:ls

1.按时间排序显示文件

test@> ll -rt

2.按文件大小排序显示文件(文件大小单位:k,M)

test@> ll -Sh

参数的解释如下:

-r, --reverse              reverse order while sorting

 -t                         sort by modification time

-S                         sort by file size

 -h, --human-readable       with -l, print sizes in human readable format

                               (e.g., 1K 234M 2G)

posted @ 2016-03-28 17:57  灵风_滴水穿石  阅读(7836)  评论(0编辑  收藏  举报