Show Linux Directory Structure As Ascii Text

August 10, 2017

Use tree command.

tree
# Output
.
├── dist
│   ├── bundle.js
│   └── index.html
├── src
│   └── index.js
├── package.json
└── webpack.config.js
tree --charset unicode
# Output
.
|-- dist
|   `-- bundle.js
|   `-- index.html
|-- src
|   `-- index.js
|-- package.json
`-- webpack.config.js

Ignore file or directory pattern with -I .

tree -I 'dist|*.json'
# Output
.
├── src
│   └── index.js
└── webpack.config.js
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.