tree #以树状形式显示目录列表
[root@clf ~]# yum install -y tree
选项:
-a #显示所有文件或者目录 隐藏文件
-d #只显示目录及目录的数量
-h #显示文件的大小
-F #给不同类型的文件加上不同的标识符
/ #目录
* #可执行文件
= #套接字文件 socker文件
| #管道文件
-L #查看指定层数
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 40 41 42 43 44 45 46 47 48 |
[root@clf ~]# tree . └── anaconda-ks.cfg 0 directories, 1 file [root@clf ~]# tree -a . ├── anaconda-ks.cfg ├── .bash_history ├── .bash_logout ├── .bash_profile ├── .bashrc ├── .cshrc └── .tcshrc 0 directories, 7 files [root@clf ~]# tree -d /var/log/ /var/log/ ├── anaconda ├── audit ├── rhsm └── tuned 4 directories [root@clf ~]# tree -h /var/log/ /var/log/ ├── [ 176] anaconda │ ├── [ 26K] anaconda.log │ ├── [3.9K] ifcfg.log │ ├── [1.5M] journal.log │ ├── [ 0] ks-script-3PCKae.log │ ├── [108K] packaging.log │ ├── [ 29K] program.log │ ├── [121K] storage.log │ ├── [275K] syslog │ └── [ 21K] X.log [root@clf ~]# tree -L 2 / |