ls #显示文件或者目录列表信息
常用选项:
-l #以长格式形式显示文件或者目录的详细属性信息
-i #显示文件或者目录的inode信息 索引节点信息
-h #以字节大小的形式显示文件大小 B KB MB GB
-a #显示所有的文件,隐藏文件 所有以点开头的文件就是隐藏文件
-S #以文件大小进行排序 从大到小显示
-t #根据时间进行排序 最新的时间在最上面
-r #倒叙排序
-F #给不同的文件加上不同的标识符
-d #显示目录本身信息
/ #目录
* #可执行文件
= #套接字文件 socker文件
| #管道文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
[root@clf ~]# ls #如果不加目录信息,默认针对的是当前目录操作 anaconda-ks.cfg [root@clf ~]# ls /root anaconda-ks.cfg [root@clf ~]# ls -l total 4 -rw-------. 1 root root 1429 Jul 6 02:17 anaconda-ks.cfg === 系统自带的别名 ll === ls -l [root@clf ~]# ll total 4 -rw-------. 1 root root 1429 Jul 6 02:17 anaconda-ks.cfg [root@clf ~]# ls -li total 4 134317667 -rw-------. 1 root root 1429 Jul 6 02:17 anaconda-ks.cfg [root@clf ~]# ll -h total 4.0K -rw-------. 1 root root 1.4K Jul 6 02:17 anaconda-ks.cfg [root@clf ~]# ll -a total 28 dr-xr-x---. 2 root root 135 Jul 6 09:06 . dr-xr-xr-x. 17 root root 224 Jul 6 02:16 .. -rw-------. 1 root root 1429 Jul 6 02:17 anaconda-ks.cfg -rw-------. 1 root root 879 Jul 7 18:59 .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 -rw-r--r--. 1 root root 129 Dec 29 2013 .tcshrc |