开机 关机 重启
pwd
ls
cd
touch
mkdir
tree
rm
list contents of directories in a tree-like format.
以树状图列出目录的内容
1. 查看是否安装
rpm -qa tree
rpm -qa 查看已经安装的包
2. 安装tree
yum install tree -y
-y 的意思是不需要交互,即自动安装
3. 基本语法
tree [OPTION]... [DIRETCORY]
OPTION:
-L 指定目录层数,后面跟数字
-d 只列出目录
4. 实例
- 列出当前目录所有目录和文件
tree
- 列出根目录所有目录,只要2层
tree -Ld 2 /