tree命令
以树形结构列出指定目录下的所有内容,包括所有文件、子目录及子目录里的目录和文件
语法:
tree [option] [directory]
option选项:
-a 显示所有文件 包括隐藏文件
-d 显示目录
-f 显示每个文件的全路径
-i 不显示树枝 一般与-f配合使用
-L level 遍历目录的最大层
-bash: tree: command not found的解决方法
[root@VM-4-2-centos /]# yum -y install tree
[root@VM-4-2-centos /]# tree /home/ /home/ `-- lighthouse 1 directory, 0 files
临时解决树形目录乱码的办法:
# LANG=en_US.UTF-8