一、作用
显示当前目录下的内容
二、选项
- -a 显示全部的文件
- -h 以人们易读的方式显示文件或目录大小
- -t 以时间排序
- -l 使用长格式列出文件和目录信息l
- -d 之查看目录
- -r 依相反次序排列
三、实例
```
[root@xxxx:~ ]# ls -al
total 84
dr-xr-x—-. 5 root root 4096 Jun 7 17:26 .
dr-xr-xr-x. 21 root root 287 Jun 7 15:25 ..
-rw-r—r— 1 root root 8702 Jun 4 23:34 060—Linux.xsh
-rwx——— 1 root root 1487 Jun 7 00:43 12
-rwx———. 1 root root 1487 Jun 5 07:00 123
-rw-rw-rw- 1 brook brook 0 Jun 7 00:30 1.txt
-rwx———. 1 root root 1487 Jun 5 07:00 anaconda-ks.cfg
-rw———-. 1 root root 12343 Jun 7 21:48 .bash_history
-rw-r—r—. 1 root root 18 Dec 29 2013 .bash_logout
-rw-r—r—. 1 root root 176 Dec 29 2013 .bash_profile
-rw-r—r—. 1 root root 176 Dec 29 2013 .bashrc
-rw-r—r—. 1 root root 100 Dec 29 2013 .cshrc
drwxr-xr-x 2 root root 6 Jun 7 00:31 dir
-rw-r—r— 1 root root 1185 Jun 7 17:26 dsad
-rw———-. 1 root root 44 Jun 7 15:46 .lesshst
lrwxrwxrwx 1 root root 11 Jun 7 00:24 passwd -> /etc/passwd
drwxr——- 3 root root 19 Jun 5 01:25 .pki
-rw-r—r— 1 brook brook 0 Jun 7 15:05 sd.txt
drwx——— 2 root root 57 Jun 6 23:29 .ssh
-rw-r—r—. 1 root root 129 Dec 29 2013 .tcshrc
-rw———- 1 root root 4245 Jun 7 17:26 .viminfo
-rw-r—r— 1 root root 730 Mar 18 12:08 网易云音乐.lnk
```
[root@xxxx:~ ]# ls -lh
total 32K
-rw-r--r-- 1 root root 8.5K Jun 4 23:34 060--Linux.xsh
-rwx------ 1 root root 1.5K Jun 7 00:43 12
-rwx------. 1 root root 1.5K Jun 5 07:00 123
-rw-rw-rw- 1 brook brook 0 Jun 7 00:30 1.txt
-rwx------. 1 root root 1.5K Jun 5 07:00 anaconda-ks.cfg
drwxr-xr-x 2 root root 6 Jun 7 00:31 dir
-rw-r--r-- 1 root root 1.2K Jun 7 17:26 dsad
lrwxrwxrwx 1 root root 11 Jun 7 00:24 passwd -> /etc/passwd
-rw-r--r-- 1 brook brook 0 Jun 7 15:05 sd.txt
-rw-r--r-- 1 root root 730 Mar 18 12:08 网易云音乐.lnk
[root@localhost ~]# ll -d /etc/
drwxr-xr-x. 76 root root 8192 6月 17 12:07 /etc/
[root@localhost ~]# ll /etc/
总用量 1080
-rw-r--r--. 1 root root 16 6月 5 06:59 adjtime
-rw-r--r--. 1 root root 1518 6月 7 2013 aliases
......