安装tree yum -y install tree 使用tree命令查看/var/log/的结构 tree /var/log/ 列出目录opt目录结构,只打印2层深度 tree -P opt -L 2