用法:ls [选项]... [文件]...
List information about the FILEs (the current directory by default).
-a, --all 不隐藏任何以. 开始的项目
-A, --almost-all 列出除. 及.. 以外的任何项目
--author 与-l 同时使用时列出每个文件的作者
-d, --directory list directories themselves, not their contents
-i, --inode print the index number of each file
-I, --ignore=PATTERN do not list implied entries matching shell PATTERN
-l 使用较长格式列出信息
-m 所有项目以逗号分隔,并填满整行行宽
-p, --indicator-style=slash 对目录加上表示符号"/"
-r, --reverse 逆序排列
-R, --recursive 递归显示子目录
-s, --size 以块数形式显示每个文件分配的尺寸
-t sort by modification time, newest first
-1 list one file per line
示例:
ls -a
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222136779-1190581919.png)
ls -A
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222220106-740424209.png)
ls -d
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222420018-2099697378.png)
ls -i
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222515565-2082990997.png)
ls -I 3
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222843606-842603722.png)
ls -l
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222915673-683063873.png)
ls -m
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818222940553-334600996.png)
ls -p
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818223053385-52080558.png)
ls -r
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818223033705-914768569.png)
ls -R
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818223133484-1786548982.png)
ls -lt
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818223240596-2011334000.png)
ls -s
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818223329535-1652611003.png)
ls -1
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190818223354080-1047827243.png)