Ubuntu/Linux 树形结构显示文件夹目录结构 - list contents of directories in a tree-like format - tree

Ubuntu/Linux 树形结构显示文件夹目录结构 - list contents of directories in a tree-like format - tree

tree - list contents of directories in a tree-like format.

1. Installation

(base) yongqiang@yongqiang:~$ tree

Command 'tree' not found, but can be installed with:

sudo apt install tree

(base) yongqiang@yongqiang:~$
(base) yongqiang@yongqiang:~$ sudo apt install tree
[sudo] password for yongqiang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 58 not upgraded.
Need to get 40.7 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 tree amd64 1.7.0-5 [40.7 kB]
Fetched 40.7 kB in 2s (19.3 kB/s)
Selecting previously unselected package tree.
(Reading database ... 35027 files and directories currently installed.)
Preparing to unpack .../tree_1.7.0-5_amd64.deb ...
Unpacking tree (1.7.0-5) ...
Setting up tree (1.7.0-5) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
(base) yongqiang@yongqiang:~$

2. 树形结构显示文件夹目录结构

2.1 tree

显示当前目录的树形结构。

(base) yongqiang@yongqiang:~/CLionProjects/yongqiang$ tree
.
├── CMakeLists.txt
├── cmake-build-debug
├── include
│   └── batch_norm.h
├── main.cpp
└── source
    └── batch_norm.cpp

3 directories, 4 files
(base) yongqiang@yongqiang:~/CLionProjects/yongqiang$

你可能感兴趣的:(Ubuntu,Desktop,Server,LTS,树形结构显示文件夹目录结构,tree,tree-like,format)