通过修改时间列出,比较新的会在前面,使用-t参数
root@howtouselinux etc# ls -lt
参考: how to sort by time in Linux ls command
total 1680
-rw-r–r–. 1 root root 152927 Dec 8 03:14 prelink.cache
-rw-r–r–. 1 root root 264 Dec 7 23:31 mtab
-rw-r–r–. 2 root root 53 Dec 7 23:31 resolv.conf
-rw-r–r–. 1 root root 46 Dec 7 23:31 adjtime
drwxr-xr-x. 7 root root 4096 Dec 7 23:29 sysconfig
-rw-r–r–. 2 root root 165 Dec 7 23:28 hosts
-rw-r–r–. 1 root root 1 Dec 7 23:23 resolv.conf.save
排序文件大小,-S参数
参考:how to sort by size in Linux ls command
root@howtouselinux tmp# ls -lhS /etc/
total 1.7M
-rw-r–r–. 1 root root 626K Oct 2 2013 services
-rw-r–r–. 1 root root 150K Dec 8 03:14 prelink.cache
-rw-r–r–. 1 root root 87K Dec 7 14:44 termcap
-rw-r–r–. 1 root root 43K Sep 23 2011 mime.types
drwxr-xr-x. 3 root root 4.0K Dec 7 14:43 abrt
drwxr-xr-x. 4 root root 4.0K Dec 7 14:44 acpi
Linux ls command sort by size
显示文件大小
以便于人阅读的方式显示文件大小,-h参数
root@howtouselinux tmp# ls -lh
total 20K
drwxr-xr-x. 2 root root 4.0K Dec 8 00:44 1d
drwxr-xr-x. 2 root root 4.0K Dec 8 00:44 2d
drwxr-xr-x. 2 root root 4.0K Dec 8 00:44 3d
drwxr-xr-x. 2 root root 4.0K Dec 8 00:44 4d
drwxr-xr-x. 6 root root 4.0K Dec 8 00:46 TEST