How to see the directory structure in linux


 description

Print the current 2-level directory structure in a tree structure in Linux

 command

tree -L 2

 parameter

tree : List the contents of the directory in a tree view
-L level : Descend only level directories deep.

 result

.
├── test
│   └── a
├── test2
│   ├── a
│   └── c
└── testFile

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.